//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2021 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto/tree/main/CodeGenerator. DO NOT EDIT.

import Foundation
import SotoCore

extension IoT {
    // MARK: Enums

    public enum AbortAction: String, CustomStringConvertible, Codable {
        case cancel = "CANCEL"
        public var description: String { return self.rawValue }
    }

    public enum ActionType: String, CustomStringConvertible, Codable {
        case connect = "CONNECT"
        case publish = "PUBLISH"
        case receive = "RECEIVE"
        case subscribe = "SUBSCRIBE"
        public var description: String { return self.rawValue }
    }

    public enum AlertTargetType: String, CustomStringConvertible, Codable {
        case sns = "SNS"
        public var description: String { return self.rawValue }
    }

    public enum AuditCheckRunStatus: String, CustomStringConvertible, Codable {
        case canceled = "CANCELED"
        case completedCompliant = "COMPLETED_COMPLIANT"
        case completedNonCompliant = "COMPLETED_NON_COMPLIANT"
        case failed = "FAILED"
        case inProgress = "IN_PROGRESS"
        case waitingForDataCollection = "WAITING_FOR_DATA_COLLECTION"
        public var description: String { return self.rawValue }
    }

    public enum AuditFindingSeverity: String, CustomStringConvertible, Codable {
        case critical = "CRITICAL"
        case high = "HIGH"
        case low = "LOW"
        case medium = "MEDIUM"
        public var description: String { return self.rawValue }
    }

    public enum AuditFrequency: String, CustomStringConvertible, Codable {
        case biweekly = "BIWEEKLY"
        case daily = "DAILY"
        case monthly = "MONTHLY"
        case weekly = "WEEKLY"
        public var description: String { return self.rawValue }
    }

    public enum AuditMitigationActionsExecutionStatus: String, CustomStringConvertible, Codable {
        case canceled = "CANCELED"
        case completed = "COMPLETED"
        case failed = "FAILED"
        case inProgress = "IN_PROGRESS"
        case pending = "PENDING"
        case skipped = "SKIPPED"
        public var description: String { return self.rawValue }
    }

    public enum AuditMitigationActionsTaskStatus: String, CustomStringConvertible, Codable {
        case canceled = "CANCELED"
        case completed = "COMPLETED"
        case failed = "FAILED"
        case inProgress = "IN_PROGRESS"
        public var description: String { return self.rawValue }
    }

    public enum AuditNotificationType: String, CustomStringConvertible, Codable {
        case sns = "SNS"
        public var description: String { return self.rawValue }
    }

    public enum AuditTaskStatus: String, CustomStringConvertible, Codable {
        case canceled = "CANCELED"
        case completed = "COMPLETED"
        case failed = "FAILED"
        case inProgress = "IN_PROGRESS"
        public var description: String { return self.rawValue }
    }

    public enum AuditTaskType: String, CustomStringConvertible, Codable {
        case onDemandAuditTask = "ON_DEMAND_AUDIT_TASK"
        case scheduledAuditTask = "SCHEDULED_AUDIT_TASK"
        public var description: String { return self.rawValue }
    }

    public enum AuthDecision: String, CustomStringConvertible, Codable {
        case allowed = "ALLOWED"
        case explicitDeny = "EXPLICIT_DENY"
        case implicitDeny = "IMPLICIT_DENY"
        public var description: String { return self.rawValue }
    }

    public enum AuthorizerStatus: String, CustomStringConvertible, Codable {
        case active = "ACTIVE"
        case inactive = "INACTIVE"
        public var description: String { return self.rawValue }
    }

    public enum AutoRegistrationStatus: String, CustomStringConvertible, Codable {
        case disable = "DISABLE"
        case enable = "ENABLE"
        public var description: String { return self.rawValue }
    }

    public enum AwsJobAbortCriteriaAbortAction: String, CustomStringConvertible, Codable {
        case cancel = "CANCEL"
        public var description: String { return self.rawValue }
    }

    public enum AwsJobAbortCriteriaFailureType: String, CustomStringConvertible, Codable {
        case all = "ALL"
        case failed = "FAILED"
        case rejected = "REJECTED"
        case timedOut = "TIMED_OUT"
        public var description: String { return self.rawValue }
    }

    public enum BehaviorCriteriaType: String, CustomStringConvertible, Codable {
        case machineLearning = "MACHINE_LEARNING"
        case `static` = "STATIC"
        case statistical = "STATISTICAL"
        public var description: String { return self.rawValue }
    }

    public enum CACertificateStatus: String, CustomStringConvertible, Codable {
        case active = "ACTIVE"
        case inactive = "INACTIVE"
        public var description: String { return self.rawValue }
    }

    public enum CACertificateUpdateAction: String, CustomStringConvertible, Codable {
        case deactivate = "DEACTIVATE"
        public var description: String { return self.rawValue }
    }

    public enum CannedAccessControlList: String, CustomStringConvertible, Codable {
        case authenticatedRead = "authenticated-read"
        case awsExecRead = "aws-exec-read"
        case bucketOwnerFullControl = "bucket-owner-full-control"
        case bucketOwnerRead = "bucket-owner-read"
        case logDeliveryWrite = "log-delivery-write"
        case `private`
        case publicRead = "public-read"
        case publicReadWrite = "public-read-write"
        public var description: String { return self.rawValue }
    }

    public enum CertificateMode: String, CustomStringConvertible, Codable {
        case `default` = "DEFAULT"
        case sniOnly = "SNI_ONLY"
        public var description: String { return self.rawValue }
    }

    public enum CertificateStatus: String, CustomStringConvertible, Codable {
        case active = "ACTIVE"
        case inactive = "INACTIVE"
        case pendingActivation = "PENDING_ACTIVATION"
        case pendingTransfer = "PENDING_TRANSFER"
        case registerInactive = "REGISTER_INACTIVE"
        case revoked = "REVOKED"
        public var description: String { return self.rawValue }
    }

    public enum ComparisonOperator: String, CustomStringConvertible, Codable {
        case greaterThan = "greater-than"
        case greaterThanEquals = "greater-than-equals"
        case inCidrSet = "in-cidr-set"
        case inPortSet = "in-port-set"
        case inSet = "in-set"
        case lessThan = "less-than"
        case lessThanEquals = "less-than-equals"
        case notInCidrSet = "not-in-cidr-set"
        case notInPortSet = "not-in-port-set"
        case notInSet = "not-in-set"
        public var description: String { return self.rawValue }
    }

    public enum ConfidenceLevel: String, CustomStringConvertible, Codable {
        case high = "HIGH"
        case low = "LOW"
        case medium = "MEDIUM"
        public var description: String { return self.rawValue }
    }

    public enum CustomMetricType: String, CustomStringConvertible, Codable {
        case ipAddressList = "ip-address-list"
        case number
        case numberList = "number-list"
        case stringList = "string-list"
        public var description: String { return self.rawValue }
    }

    public enum DayOfWeek: String, CustomStringConvertible, Codable {
        case fri = "FRI"
        case mon = "MON"
        case sat = "SAT"
        case sun = "SUN"
        case thu = "THU"
        case tue = "TUE"
        case wed = "WED"
        public var description: String { return self.rawValue }
    }

    public enum DetectMitigationActionExecutionStatus: String, CustomStringConvertible, Codable {
        case failed = "FAILED"
        case inProgress = "IN_PROGRESS"
        case skipped = "SKIPPED"
        case successful = "SUCCESSFUL"
        public var description: String { return self.rawValue }
    }

    public enum DetectMitigationActionsTaskStatus: String, CustomStringConvertible, Codable {
        case canceled = "CANCELED"
        case failed = "FAILED"
        case inProgress = "IN_PROGRESS"
        case successful = "SUCCESSFUL"
        public var description: String { return self.rawValue }
    }

    public enum DeviceCertificateUpdateAction: String, CustomStringConvertible, Codable {
        case deactivate = "DEACTIVATE"
        public var description: String { return self.rawValue }
    }

    public enum DimensionType: String, CustomStringConvertible, Codable {
        case topicFilter = "TOPIC_FILTER"
        public var description: String { return self.rawValue }
    }

    public enum DimensionValueOperator: String, CustomStringConvertible, Codable {
        case `in` = "IN"
        case notIn = "NOT_IN"
        public var description: String { return self.rawValue }
    }

    public enum DomainConfigurationStatus: String, CustomStringConvertible, Codable {
        case disabled = "DISABLED"
        case enabled = "ENABLED"
        public var description: String { return self.rawValue }
    }

    public enum DomainType: String, CustomStringConvertible, Codable {
        case awsManaged = "AWS_MANAGED"
        case customerManaged = "CUSTOMER_MANAGED"
        case endpoint = "ENDPOINT"
        public var description: String { return self.rawValue }
    }

    public enum DynamicGroupStatus: String, CustomStringConvertible, Codable {
        case active = "ACTIVE"
        case building = "BUILDING"
        case rebuilding = "REBUILDING"
        public var description: String { return self.rawValue }
    }

    public enum DynamoKeyType: String, CustomStringConvertible, Codable {
        case number = "NUMBER"
        case string = "STRING"
        public var description: String { return self.rawValue }
    }

    public enum EventType: String, CustomStringConvertible, Codable {
        case caCertificate = "CA_CERTIFICATE"
        case certificate = "CERTIFICATE"
        case job = "JOB"
        case jobExecution = "JOB_EXECUTION"
        case policy = "POLICY"
        case thing = "THING"
        case thingGroup = "THING_GROUP"
        case thingGroupHierarchy = "THING_GROUP_HIERARCHY"
        case thingGroupMembership = "THING_GROUP_MEMBERSHIP"
        case thingType = "THING_TYPE"
        case thingTypeAssociation = "THING_TYPE_ASSOCIATION"
        public var description: String { return self.rawValue }
    }

    public enum FieldType: String, CustomStringConvertible, Codable {
        case boolean = "Boolean"
        case number = "Number"
        case string = "String"
        public var description: String { return self.rawValue }
    }

    public enum IndexStatus: String, CustomStringConvertible, Codable {
        case active = "ACTIVE"
        case building = "BUILDING"
        case rebuilding = "REBUILDING"
        public var description: String { return self.rawValue }
    }

    public enum JobExecutionFailureType: String, CustomStringConvertible, Codable {
        case all = "ALL"
        case failed = "FAILED"
        case rejected = "REJECTED"
        case timedOut = "TIMED_OUT"
        public var description: String { return self.rawValue }
    }

    public enum JobExecutionStatus: String, CustomStringConvertible, Codable {
        case canceled = "CANCELED"
        case failed = "FAILED"
        case inProgress = "IN_PROGRESS"
        case queued = "QUEUED"
        case rejected = "REJECTED"
        case removed = "REMOVED"
        case succeeded = "SUCCEEDED"
        case timedOut = "TIMED_OUT"
        public var description: String { return self.rawValue }
    }

    public enum JobStatus: String, CustomStringConvertible, Codable {
        case canceled = "CANCELED"
        case completed = "COMPLETED"
        case deletionInProgress = "DELETION_IN_PROGRESS"
        case inProgress = "IN_PROGRESS"
        public var description: String { return self.rawValue }
    }

    public enum LogLevel: String, CustomStringConvertible, Codable {
        case debug = "DEBUG"
        case disabled = "DISABLED"
        case error = "ERROR"
        case info = "INFO"
        case warn = "WARN"
        public var description: String { return self.rawValue }
    }

    public enum LogTargetType: String, CustomStringConvertible, Codable {
        case `default` = "DEFAULT"
        case thingGroup = "THING_GROUP"
        public var description: String { return self.rawValue }
    }

    public enum MessageFormat: String, CustomStringConvertible, Codable {
        case json = "JSON"
        case raw = "RAW"
        public var description: String { return self.rawValue }
    }

    public enum MitigationActionType: String, CustomStringConvertible, Codable {
        case addThingsToThingGroup = "ADD_THINGS_TO_THING_GROUP"
        case enableIotLogging = "ENABLE_IOT_LOGGING"
        case publishFindingToSns = "PUBLISH_FINDING_TO_SNS"
        case replaceDefaultPolicyVersion = "REPLACE_DEFAULT_POLICY_VERSION"
        case updateCaCertificate = "UPDATE_CA_CERTIFICATE"
        case updateDeviceCertificate = "UPDATE_DEVICE_CERTIFICATE"
        public var description: String { return self.rawValue }
    }

    public enum ModelStatus: String, CustomStringConvertible, Codable {
        case active = "ACTIVE"
        case expired = "EXPIRED"
        case pendingBuild = "PENDING_BUILD"
        public var description: String { return self.rawValue }
    }

    public enum OTAUpdateStatus: String, CustomStringConvertible, Codable {
        case createComplete = "CREATE_COMPLETE"
        case createFailed = "CREATE_FAILED"
        case createInProgress = "CREATE_IN_PROGRESS"
        case createPending = "CREATE_PENDING"
        public var description: String { return self.rawValue }
    }

    public enum PolicyTemplateName: String, CustomStringConvertible, Codable {
        case blankPolicy = "BLANK_POLICY"
        public var description: String { return self.rawValue }
    }

    public enum `Protocol`: String, CustomStringConvertible, Codable {
        case http = "HTTP"
        case mqtt = "MQTT"
        public var description: String { return self.rawValue }
    }

    public enum ReportType: String, CustomStringConvertible, Codable {
        case errors = "ERRORS"
        case results = "RESULTS"
        public var description: String { return self.rawValue }
    }

    public enum ResourceType: String, CustomStringConvertible, Codable {
        case accountSettings = "ACCOUNT_SETTINGS"
        case caCertificate = "CA_CERTIFICATE"
        case clientId = "CLIENT_ID"
        case cognitoIdentityPool = "COGNITO_IDENTITY_POOL"
        case deviceCertificate = "DEVICE_CERTIFICATE"
        case iamRole = "IAM_ROLE"
        case iotPolicy = "IOT_POLICY"
        case roleAlias = "ROLE_ALIAS"
        public var description: String { return self.rawValue }
    }

    public enum ServerCertificateStatus: String, CustomStringConvertible, Codable {
        case invalid = "INVALID"
        case valid = "VALID"
        public var description: String { return self.rawValue }
    }

    public enum ServiceType: String, CustomStringConvertible, Codable {
        case credentialProvider = "CREDENTIAL_PROVIDER"
        case data = "DATA"
        case jobs = "JOBS"
        public var description: String { return self.rawValue }
    }

    public enum Status: String, CustomStringConvertible, Codable {
        case cancelled = "Cancelled"
        case cancelling = "Cancelling"
        case completed = "Completed"
        case failed = "Failed"
        case inprogress = "InProgress"
        public var description: String { return self.rawValue }
    }

    public enum TargetSelection: String, CustomStringConvertible, Codable {
        case continuous = "CONTINUOUS"
        case snapshot = "SNAPSHOT"
        public var description: String { return self.rawValue }
    }

    public enum ThingConnectivityIndexingMode: String, CustomStringConvertible, Codable {
        case off = "OFF"
        case status = "STATUS"
        public var description: String { return self.rawValue }
    }

    public enum ThingGroupIndexingMode: String, CustomStringConvertible, Codable {
        case off = "OFF"
        case on = "ON"
        public var description: String { return self.rawValue }
    }

    public enum ThingIndexingMode: String, CustomStringConvertible, Codable {
        case off = "OFF"
        case registry = "REGISTRY"
        case registryAndShadow = "REGISTRY_AND_SHADOW"
        public var description: String { return self.rawValue }
    }

    public enum TopicRuleDestinationStatus: String, CustomStringConvertible, Codable {
        case deleting = "DELETING"
        case disabled = "DISABLED"
        case enabled = "ENABLED"
        case error = "ERROR"
        case inProgress = "IN_PROGRESS"
        public var description: String { return self.rawValue }
    }

    public enum ViolationEventType: String, CustomStringConvertible, Codable {
        case alarmCleared = "alarm-cleared"
        case alarmInvalidated = "alarm-invalidated"
        case inAlarm = "in-alarm"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AbortConfig: AWSEncodableShape & AWSDecodableShape {
        /// The list of criteria that determine when and how to abort the job.
        public let criteriaList: [AbortCriteria]

        public init(criteriaList: [AbortCriteria]) {
            self.criteriaList = criteriaList
        }

        public func validate(name: String) throws {
            try self.criteriaList.forEach {
                try $0.validate(name: "\(name).criteriaList[]")
            }
            try self.validate(self.criteriaList, name: "criteriaList", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case criteriaList
        }
    }

    public struct AbortCriteria: AWSEncodableShape & AWSDecodableShape {
        /// The type of job action to take to initiate the job abort.
        public let action: AbortAction
        /// The type of job execution failures that can initiate a job abort.
        public let failureType: JobExecutionFailureType
        /// The minimum number of things which must receive job execution notifications before the job can be aborted.
        public let minNumberOfExecutedThings: Int
        /// The minimum percentage of job execution failures that must occur to initiate the job abort. AWS IoT supports up to two digits after the decimal (for example, 10.9 and 10.99, but not 10.999).
        public let thresholdPercentage: Double

        public init(action: AbortAction, failureType: JobExecutionFailureType, minNumberOfExecutedThings: Int, thresholdPercentage: Double) {
            self.action = action
            self.failureType = failureType
            self.minNumberOfExecutedThings = minNumberOfExecutedThings
            self.thresholdPercentage = thresholdPercentage
        }

        public func validate(name: String) throws {
            try self.validate(self.minNumberOfExecutedThings, name: "minNumberOfExecutedThings", parent: name, min: 1)
            try self.validate(self.thresholdPercentage, name: "thresholdPercentage", parent: name, max: 100)
        }

        private enum CodingKeys: String, CodingKey {
            case action
            case failureType
            case minNumberOfExecutedThings
            case thresholdPercentage
        }
    }

    public struct AcceptCertificateTransferRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "certificateId", location: .uri(locationName: "certificateId")),
            AWSMemberEncoding(label: "setAsActive", location: .querystring(locationName: "setAsActive"))
        ]

        /// The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)
        public let certificateId: String
        /// Specifies whether the certificate is active.
        public let setAsActive: Bool?

        public init(certificateId: String, setAsActive: Bool? = nil) {
            self.certificateId = certificateId
            self.setAsActive = setAsActive
        }

        public func validate(name: String) throws {
            try self.validate(self.certificateId, name: "certificateId", parent: name, max: 64)
            try self.validate(self.certificateId, name: "certificateId", parent: name, min: 64)
            try self.validate(self.certificateId, name: "certificateId", parent: name, pattern: "(0x)?[a-fA-F0-9]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct Action: AWSEncodableShape & AWSDecodableShape {
        /// Change the state of a CloudWatch alarm.
        public let cloudwatchAlarm: CloudwatchAlarmAction?
        /// Send data to CloudWatch Logs.
        public let cloudwatchLogs: CloudwatchLogsAction?
        /// Capture a CloudWatch metric.
        public let cloudwatchMetric: CloudwatchMetricAction?
        /// Write to a DynamoDB table.
        public let dynamoDB: DynamoDBAction?
        /// Write to a DynamoDB table. This is a new version of the DynamoDB action. It allows you to write each attribute in an MQTT message payload into a separate DynamoDB column.
        public let dynamoDBv2: DynamoDBv2Action?
        /// Write data to an Amazon Elasticsearch Service domain.
        public let elasticsearch: ElasticsearchAction?
        /// Write to an Amazon Kinesis Firehose stream.
        public let firehose: FirehoseAction?
        /// Send data to an HTTPS endpoint.
        public let http: HttpAction?
        /// Sends message data to an AWS IoT Analytics channel.
        public let iotAnalytics: IotAnalyticsAction?
        /// Sends an input to an AWS IoT Events detector.
        public let iotEvents: IotEventsAction?
        /// Sends data from the MQTT message that triggered the rule to AWS IoT SiteWise asset properties.
        public let iotSiteWise: IotSiteWiseAction?
        /// Send messages to an Amazon Managed Streaming for Apache Kafka (Amazon MSK) or self-managed Apache Kafka cluster.
        public let kafka: KafkaAction?
        /// Write data to an Amazon Kinesis stream.
        public let kinesis: KinesisAction?
        /// Invoke a Lambda function.
        public let lambda: LambdaAction?
        /// Publish to another MQTT topic.
        public let republish: RepublishAction?
        /// Write to an Amazon S3 bucket.
        public let s3: S3Action?
        /// Send a message to a Salesforce IoT Cloud Input Stream.
        public let salesforce: SalesforceAction?
        /// Publish to an Amazon SNS topic.
        public let sns: SnsAction?
        /// Publish to an Amazon SQS queue.
        public let sqs: SqsAction?
        /// Starts execution of a Step Functions state machine.
        public let stepFunctions: StepFunctionsAction?
        /// The Timestream rule action writes attributes (measures) from an MQTT message into an Amazon Timestream table. For more information, see the Timestream topic rule action documentation.
        public let timestream: TimestreamAction?

        public init(cloudwatchAlarm: CloudwatchAlarmAction? = nil, cloudwatchLogs: CloudwatchLogsAction? = nil, cloudwatchMetric: CloudwatchMetricAction? = nil, dynamoDB: DynamoDBAction? = nil, dynamoDBv2: DynamoDBv2Action? = nil, elasticsearch: ElasticsearchAction? = nil, firehose: FirehoseAction? = nil, http: HttpAction? = nil, iotAnalytics: IotAnalyticsAction? = nil, iotEvents: IotEventsAction? = nil, iotSiteWise: IotSiteWiseAction? = nil, kafka: KafkaAction? = nil, kinesis: KinesisAction? = nil, lambda: LambdaAction? = nil, republish: RepublishAction? = nil, s3: S3Action? = nil, salesforce: SalesforceAction? = nil, sns: SnsAction? = nil, sqs: SqsAction? = nil, stepFunctions: StepFunctionsAction? = nil, timestream: TimestreamAction? = nil) {
            self.cloudwatchAlarm = cloudwatchAlarm
            self.cloudwatchLogs = cloudwatchLogs
            self.cloudwatchMetric = cloudwatchMetric
            self.dynamoDB = dynamoDB
            self.dynamoDBv2 = dynamoDBv2
            self.elasticsearch = elasticsearch
            self.firehose = firehose
            self.http = http
            self.iotAnalytics = iotAnalytics
            self.iotEvents = iotEvents
            self.iotSiteWise = iotSiteWise
            self.kafka = kafka
            self.kinesis = kinesis
            self.lambda = lambda
            self.republish = republish
            self.s3 = s3
            self.salesforce = salesforce
            self.sns = sns
            self.sqs = sqs
            self.stepFunctions = stepFunctions
            self.timestream = timestream
        }

        public func validate(name: String) throws {
            try self.elasticsearch?.validate(name: "\(name).elasticsearch")
            try self.firehose?.validate(name: "\(name).firehose")
            try self.http?.validate(name: "\(name).http")
            try self.iotEvents?.validate(name: "\(name).iotEvents")
            try self.iotSiteWise?.validate(name: "\(name).iotSiteWise")
            try self.republish?.validate(name: "\(name).republish")
            try self.salesforce?.validate(name: "\(name).salesforce")
            try self.timestream?.validate(name: "\(name).timestream")
        }

        private enum CodingKeys: String, CodingKey {
            case cloudwatchAlarm
            case cloudwatchLogs
            case cloudwatchMetric
            case dynamoDB
            case dynamoDBv2
            case elasticsearch
            case firehose
            case http
            case iotAnalytics
            case iotEvents
            case iotSiteWise
            case kafka
            case kinesis
            case lambda
            case republish
            case s3
            case salesforce
            case sns
            case sqs
            case stepFunctions
            case timestream
        }
    }

    public struct ActiveViolation: AWSDecodableShape {
        /// The behavior that is being violated.
        public let behavior: Behavior?
        /// The time the most recent violation occurred.
        public let lastViolationTime: Date?
        /// The value of the metric (the measurement) that caused the most recent violation.
        public let lastViolationValue: MetricValue?
        /// The security profile with the behavior is in violation.
        public let securityProfileName: String?
        /// The name of the thing responsible for the active violation.
        public let thingName: String?
        ///  The details of a violation event.
        public let violationEventAdditionalInfo: ViolationEventAdditionalInfo?
        /// The ID of the active violation.
        public let violationId: String?
        /// The time the violation started.
        public let violationStartTime: Date?

        public init(behavior: Behavior? = nil, lastViolationTime: Date? = nil, lastViolationValue: MetricValue? = nil, securityProfileName: String? = nil, thingName: String? = nil, violationEventAdditionalInfo: ViolationEventAdditionalInfo? = nil, violationId: String? = nil, violationStartTime: Date? = nil) {
            self.behavior = behavior
            self.lastViolationTime = lastViolationTime
            self.lastViolationValue = lastViolationValue
            self.securityProfileName = securityProfileName
            self.thingName = thingName
            self.violationEventAdditionalInfo = violationEventAdditionalInfo
            self.violationId = violationId
            self.violationStartTime = violationStartTime
        }

        private enum CodingKeys: String, CodingKey {
            case behavior
            case lastViolationTime
            case lastViolationValue
            case securityProfileName
            case thingName
            case violationEventAdditionalInfo
            case violationId
            case violationStartTime
        }
    }

    public struct AddThingToBillingGroupRequest: AWSEncodableShape {
        /// The ARN of the billing group.
        public let billingGroupArn: String?
        /// The name of the billing group.
        public let billingGroupName: String?
        /// The ARN of the thing to be added to the billing group.
        public let thingArn: String?
        /// The name of the thing to be added to the billing group.
        public let thingName: String?

        public init(billingGroupArn: String? = nil, billingGroupName: String? = nil, thingArn: String? = nil, thingName: String? = nil) {
            self.billingGroupArn = billingGroupArn
            self.billingGroupName = billingGroupName
            self.thingArn = thingArn
            self.thingName = thingName
        }

        public func validate(name: String) throws {
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, max: 128)
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, min: 1)
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case billingGroupArn
            case billingGroupName
            case thingArn
            case thingName
        }
    }

    public struct AddThingToBillingGroupResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AddThingToThingGroupRequest: AWSEncodableShape {
        /// Override dynamic thing groups with static thing groups when 10-group limit is reached. If a thing belongs to 10 thing groups, and one or more of those groups are dynamic thing groups, adding a thing to a static group removes the thing from the last dynamic group.
        public let overrideDynamicGroups: Bool?
        /// The ARN of the thing to add to a group.
        public let thingArn: String?
        /// The ARN of the group to which you are adding a thing.
        public let thingGroupArn: String?
        /// The name of the group to which you are adding a thing.
        public let thingGroupName: String?
        /// The name of the thing to add to a group.
        public let thingName: String?

        public init(overrideDynamicGroups: Bool? = nil, thingArn: String? = nil, thingGroupArn: String? = nil, thingGroupName: String? = nil, thingName: String? = nil) {
            self.overrideDynamicGroups = overrideDynamicGroups
            self.thingArn = thingArn
            self.thingGroupArn = thingGroupArn
            self.thingGroupName = thingGroupName
            self.thingName = thingName
        }

        public func validate(name: String) throws {
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, max: 128)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, min: 1)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case overrideDynamicGroups
            case thingArn
            case thingGroupArn
            case thingGroupName
            case thingName
        }
    }

    public struct AddThingToThingGroupResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AddThingsToThingGroupParams: AWSEncodableShape & AWSDecodableShape {
        /// Specifies if this mitigation action can move the things that triggered the mitigation action even if they are part of one or more dynamic thing groups.
        public let overrideDynamicGroups: Bool?
        /// The list of groups to which you want to add the things that triggered the mitigation action. You can add a thing to a maximum of 10 groups, but you can't add a thing to more than one group in the same hierarchy.
        public let thingGroupNames: [String]

        public init(overrideDynamicGroups: Bool? = nil, thingGroupNames: [String]) {
            self.overrideDynamicGroups = overrideDynamicGroups
            self.thingGroupNames = thingGroupNames
        }

        public func validate(name: String) throws {
            try self.thingGroupNames.forEach {
                try validate($0, name: "thingGroupNames[]", parent: name, max: 128)
                try validate($0, name: "thingGroupNames[]", parent: name, min: 1)
                try validate($0, name: "thingGroupNames[]", parent: name, pattern: "[a-zA-Z0-9:_-]+")
            }
            try self.validate(self.thingGroupNames, name: "thingGroupNames", parent: name, max: 10)
            try self.validate(self.thingGroupNames, name: "thingGroupNames", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case overrideDynamicGroups
            case thingGroupNames
        }
    }

    public struct AlertTarget: AWSEncodableShape & AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the notification target to which alerts are sent.
        public let alertTargetArn: String
        /// The ARN of the role that grants permission to send alerts to the notification target.
        public let roleArn: String

        public init(alertTargetArn: String, roleArn: String) {
            self.alertTargetArn = alertTargetArn
            self.roleArn = roleArn
        }

        public func validate(name: String) throws {
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 20)
        }

        private enum CodingKeys: String, CodingKey {
            case alertTargetArn
            case roleArn
        }
    }

    public struct Allowed: AWSDecodableShape {
        /// A list of policies that allowed the authentication.
        public let policies: [Policy]?

        public init(policies: [Policy]? = nil) {
            self.policies = policies
        }

        private enum CodingKeys: String, CodingKey {
            case policies
        }
    }

    public struct AssetPropertyTimestamp: AWSEncodableShape & AWSDecodableShape {
        /// Optional. A string that contains the nanosecond time offset. Accepts substitution templates.
        public let offsetInNanos: String?
        /// A string that contains the time in seconds since epoch. Accepts substitution templates.
        public let timeInSeconds: String

        public init(offsetInNanos: String? = nil, timeInSeconds: String) {
            self.offsetInNanos = offsetInNanos
            self.timeInSeconds = timeInSeconds
        }

        private enum CodingKeys: String, CodingKey {
            case offsetInNanos
            case timeInSeconds
        }
    }

    public struct AssetPropertyValue: AWSEncodableShape & AWSDecodableShape {
        /// Optional. A string that describes the quality of the value. Accepts substitution templates. Must be GOOD, BAD, or UNCERTAIN.
        public let quality: String?
        /// The asset property value timestamp.
        public let timestamp: AssetPropertyTimestamp
        /// The value of the asset property.
        public let value: AssetPropertyVariant

        public init(quality: String? = nil, timestamp: AssetPropertyTimestamp, value: AssetPropertyVariant) {
            self.quality = quality
            self.timestamp = timestamp
            self.value = value
        }

        public func validate(name: String) throws {
            try self.value.validate(name: "\(name).value")
        }

        private enum CodingKeys: String, CodingKey {
            case quality
            case timestamp
            case value
        }
    }

    public struct AssetPropertyVariant: AWSEncodableShape & AWSDecodableShape {
        /// Optional. A string that contains the boolean value (true or false) of the value entry. Accepts substitution templates.
        public let booleanValue: String?
        /// Optional. A string that contains the double value of the value entry. Accepts substitution templates.
        public let doubleValue: String?
        /// Optional. A string that contains the integer value of the value entry. Accepts substitution templates.
        public let integerValue: String?
        /// Optional. The string value of the value entry. Accepts substitution templates.
        public let stringValue: String?

        public init(booleanValue: String? = nil, doubleValue: String? = nil, integerValue: String? = nil, stringValue: String? = nil) {
            self.booleanValue = booleanValue
            self.doubleValue = doubleValue
            self.integerValue = integerValue
            self.stringValue = stringValue
        }

        public func validate(name: String) throws {
            try self.validate(self.stringValue, name: "stringValue", parent: name, max: 1024)
            try self.validate(self.stringValue, name: "stringValue", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case booleanValue
            case doubleValue
            case integerValue
            case stringValue
        }
    }

    public struct AssociateTargetsWithJobRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "jobId", location: .uri(locationName: "jobId")),
            AWSMemberEncoding(label: "namespaceId", location: .querystring(locationName: "namespaceId"))
        ]

        /// An optional comment string describing why the job was associated with the targets.
        public let comment: String?
        /// The unique identifier you assigned to this job when it was created.
        public let jobId: String
        /// The namespace used to indicate that a job is a customer-managed job. When you specify a value for this parameter, AWS IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.  $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/   The namespaceId feature is in public preview.
        public let namespaceId: String?
        /// A list of thing group ARNs that define the targets of the job.
        public let targets: [String]

        public init(comment: String? = nil, jobId: String, namespaceId: String? = nil, targets: [String]) {
            self.comment = comment
            self.jobId = jobId
            self.namespaceId = namespaceId
            self.targets = targets
        }

        public func validate(name: String) throws {
            try self.validate(self.comment, name: "comment", parent: name, max: 2028)
            try self.validate(self.comment, name: "comment", parent: name, pattern: "[^\\p{C}]+")
            try self.validate(self.jobId, name: "jobId", parent: name, max: 64)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "[a-zA-Z0-9_-]+")
            try self.validate(self.namespaceId, name: "namespaceId", parent: name, max: 64)
            try self.validate(self.namespaceId, name: "namespaceId", parent: name, min: 1)
            try self.validate(self.namespaceId, name: "namespaceId", parent: name, pattern: "[a-zA-Z0-9_-]+")
            try self.targets.forEach {
                try validate($0, name: "targets[]", parent: name, max: 2048)
            }
            try self.validate(self.targets, name: "targets", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case comment
            case targets
        }
    }

    public struct AssociateTargetsWithJobResponse: AWSDecodableShape {
        /// A short text description of the job.
        public let description: String?
        /// An ARN identifying the job.
        public let jobArn: String?
        /// The unique identifier you assigned to this job when it was created.
        public let jobId: String?

        public init(description: String? = nil, jobArn: String? = nil, jobId: String? = nil) {
            self.description = description
            self.jobArn = jobArn
            self.jobId = jobId
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case jobArn
            case jobId
        }
    }

    public struct AttachPolicyRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "policyName", location: .uri(locationName: "policyName"))
        ]

        /// The name of the policy to attach.
        public let policyName: String
        /// The identity to which the policy is attached.
        public let target: String

        public init(policyName: String, target: String) {
            self.policyName = policyName
            self.target = target
        }

        public func validate(name: String) throws {
            try self.validate(self.policyName, name: "policyName", parent: name, max: 128)
            try self.validate(self.policyName, name: "policyName", parent: name, min: 1)
            try self.validate(self.policyName, name: "policyName", parent: name, pattern: "[\\w+=,.@-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case target
        }
    }

    public struct AttachPrincipalPolicyRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "policyName", location: .uri(locationName: "policyName")),
            AWSMemberEncoding(label: "principal", location: .header(locationName: "x-amzn-iot-principal"))
        ]

        /// The policy name.
        public let policyName: String
        /// The principal, which can be a certificate ARN (as returned from the CreateCertificate operation) or an Amazon Cognito ID.
        public let principal: String

        public init(policyName: String, principal: String) {
            self.policyName = policyName
            self.principal = principal
        }

        public func validate(name: String) throws {
            try self.validate(self.policyName, name: "policyName", parent: name, max: 128)
            try self.validate(self.policyName, name: "policyName", parent: name, min: 1)
            try self.validate(self.policyName, name: "policyName", parent: name, pattern: "[\\w+=,.@-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct AttachSecurityProfileRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "securityProfileName", location: .uri(locationName: "securityProfileName")),
            AWSMemberEncoding(label: "securityProfileTargetArn", location: .querystring(locationName: "securityProfileTargetArn"))
        ]

        /// The security profile that is attached.
        public let securityProfileName: String
        /// The ARN of the target (thing group) to which the security profile is attached.
        public let securityProfileTargetArn: String

        public init(securityProfileName: String, securityProfileTargetArn: String) {
            self.securityProfileName = securityProfileName
            self.securityProfileTargetArn = securityProfileTargetArn
        }

        public func validate(name: String) throws {
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, max: 128)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, min: 1)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct AttachSecurityProfileResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AttachThingPrincipalRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "principal", location: .header(locationName: "x-amzn-principal")),
            AWSMemberEncoding(label: "thingName", location: .uri(locationName: "thingName"))
        ]

        /// The principal, which can be a certificate ARN (as returned from the CreateCertificate operation) or an Amazon Cognito ID.
        public let principal: String
        /// The name of the thing.
        public let thingName: String

        public init(principal: String, thingName: String) {
            self.principal = principal
            self.thingName = thingName
        }

        public func validate(name: String) throws {
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct AttachThingPrincipalResponse: AWSDecodableShape {
        public init() {}
    }

    public struct AttributePayload: AWSEncodableShape & AWSDecodableShape {
        /// A JSON string containing up to three key-value pair in JSON format. For example:  {\"attributes\":{\"string1\":\"string2\"}}
        public let attributes: [String: String]?
        /// Specifies whether the list of attributes provided in the AttributePayload is merged with the attributes stored in the registry, instead of overwriting them. To remove an attribute, call UpdateThing with an empty attribute value.  The merge attribute is only valid when calling UpdateThing or UpdateThingGroup.
        public let merge: Bool?

        public init(attributes: [String: String]? = nil, merge: Bool? = nil) {
            self.attributes = attributes
            self.merge = merge
        }

        public func validate(name: String) throws {
            try self.attributes?.forEach {
                try validate($0.key, name: "attributes.key", parent: name, max: 128)
                try validate($0.key, name: "attributes.key", parent: name, pattern: "[a-zA-Z0-9_.,@/:#-]+")
                try validate($0.value, name: "attributes[\"\($0.key)\"]", parent: name, max: 800)
                try validate($0.value, name: "attributes[\"\($0.key)\"]", parent: name, pattern: "[a-zA-Z0-9_.,@/:#-]*")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case attributes
            case merge
        }
    }

    public struct AuditCheckConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// True if this audit check is enabled for this account.
        public let enabled: Bool?

        public init(enabled: Bool? = nil) {
            self.enabled = enabled
        }

        private enum CodingKeys: String, CodingKey {
            case enabled
        }
    }

    public struct AuditCheckDetails: AWSDecodableShape {
        /// True if the check is complete and found all resources compliant.
        public let checkCompliant: Bool?
        /// The completion status of this check. One of "IN_PROGRESS", "WAITING_FOR_DATA_COLLECTION", "CANCELED", "COMPLETED_COMPLIANT", "COMPLETED_NON_COMPLIANT", or "FAILED".
        public let checkRunStatus: AuditCheckRunStatus?
        /// The code of any error encountered when this check is performed during this audit. One of "INSUFFICIENT_PERMISSIONS" or "AUDIT_CHECK_DISABLED".
        public let errorCode: String?
        /// The message associated with any error encountered when this check is performed during this audit.
        public let message: String?
        /// The number of resources that were found noncompliant during the check.
        public let nonCompliantResourcesCount: Int64?
        ///  Describes how many of the non-compliant resources created during the evaluation of an audit check were marked as suppressed.
        public let suppressedNonCompliantResourcesCount: Int64?
        /// The number of resources on which the check was performed.
        public let totalResourcesCount: Int64?

        public init(checkCompliant: Bool? = nil, checkRunStatus: AuditCheckRunStatus? = nil, errorCode: String? = nil, message: String? = nil, nonCompliantResourcesCount: Int64? = nil, suppressedNonCompliantResourcesCount: Int64? = nil, totalResourcesCount: Int64? = nil) {
            self.checkCompliant = checkCompliant
            self.checkRunStatus = checkRunStatus
            self.errorCode = errorCode
            self.message = message
            self.nonCompliantResourcesCount = nonCompliantResourcesCount
            self.suppressedNonCompliantResourcesCount = suppressedNonCompliantResourcesCount
            self.totalResourcesCount = totalResourcesCount
        }

        private enum CodingKeys: String, CodingKey {
            case checkCompliant
            case checkRunStatus
            case errorCode
            case message
            case nonCompliantResourcesCount
            case suppressedNonCompliantResourcesCount
            case totalResourcesCount
        }
    }

    public struct AuditFinding: AWSDecodableShape {
        /// The audit check that generated this result.
        public let checkName: String?
        /// A unique identifier for this set of audit findings. This identifier is used to apply mitigation tasks to one or more sets of findings.
        public let findingId: String?
        /// The time the result (finding) was discovered.
        public let findingTime: Date?
        ///  Indicates whether the audit finding was suppressed or not during reporting.
        public let isSuppressed: Bool?
        /// The resource that was found to be noncompliant with the audit check.
        public let nonCompliantResource: NonCompliantResource?
        /// The reason the resource was noncompliant.
        public let reasonForNonCompliance: String?
        /// A code that indicates the reason that the resource was noncompliant.
        public let reasonForNonComplianceCode: String?
        /// The list of related resources.
        public let relatedResources: [RelatedResource]?
        /// The severity of the result (finding).
        public let severity: AuditFindingSeverity?
        /// The ID of the audit that generated this result (finding).
        public let taskId: String?
        /// The time the audit started.
        public let taskStartTime: Date?

        public init(checkName: String? = nil, findingId: String? = nil, findingTime: Date? = nil, isSuppressed: Bool? = nil, nonCompliantResource: NonCompliantResource? = nil, reasonForNonCompliance: String? = nil, reasonForNonComplianceCode: String? = nil, relatedResources: [RelatedResource]? = nil, severity: AuditFindingSeverity? = nil, taskId: String? = nil, taskStartTime: Date? = nil) {
            self.checkName = checkName
            self.findingId = findingId
            self.findingTime = findingTime
            self.isSuppressed = isSuppressed
            self.nonCompliantResource = nonCompliantResource
            self.reasonForNonCompliance = reasonForNonCompliance
            self.reasonForNonComplianceCode = reasonForNonComplianceCode
            self.relatedResources = relatedResources
            self.severity = severity
            self.taskId = taskId
            self.taskStartTime = taskStartTime
        }

        private enum CodingKeys: String, CodingKey {
            case checkName
            case findingId
            case findingTime
            case isSuppressed
            case nonCompliantResource
            case reasonForNonCompliance
            case reasonForNonComplianceCode
            case relatedResources
            case severity
            case taskId
            case taskStartTime
        }
    }

    public struct AuditMitigationActionExecutionMetadata: AWSDecodableShape {
        /// The unique identifier for the mitigation action being applied by the task.
        public let actionId: String?
        /// The friendly name of the mitigation action being applied by the task.
        public let actionName: String?
        /// The date and time when the task was completed or canceled. Blank if the task is still running.
        public let endTime: Date?
        /// If an error occurred, the code that indicates which type of error occurred.
        public let errorCode: String?
        /// The unique identifier for the findings to which the task and associated mitigation action are applied.
        public let findingId: String?
        /// If an error occurred, a message that describes the error.
        public let message: String?
        /// The date and time when the task was started.
        public let startTime: Date?
        /// The current status of the task being executed.
        public let status: AuditMitigationActionsExecutionStatus?
        /// The unique identifier for the task that applies the mitigation action.
        public let taskId: String?

        public init(actionId: String? = nil, actionName: String? = nil, endTime: Date? = nil, errorCode: String? = nil, findingId: String? = nil, message: String? = nil, startTime: Date? = nil, status: AuditMitigationActionsExecutionStatus? = nil, taskId: String? = nil) {
            self.actionId = actionId
            self.actionName = actionName
            self.endTime = endTime
            self.errorCode = errorCode
            self.findingId = findingId
            self.message = message
            self.startTime = startTime
            self.status = status
            self.taskId = taskId
        }

        private enum CodingKeys: String, CodingKey {
            case actionId
            case actionName
            case endTime
            case errorCode
            case findingId
            case message
            case startTime
            case status
            case taskId
        }
    }

    public struct AuditMitigationActionsTaskMetadata: AWSDecodableShape {
        /// The time at which the audit mitigation actions task was started.
        public let startTime: Date?
        /// The unique identifier for the task.
        public let taskId: String?
        /// The current state of the audit mitigation actions task.
        public let taskStatus: AuditMitigationActionsTaskStatus?

        public init(startTime: Date? = nil, taskId: String? = nil, taskStatus: AuditMitigationActionsTaskStatus? = nil) {
            self.startTime = startTime
            self.taskId = taskId
            self.taskStatus = taskStatus
        }

        private enum CodingKeys: String, CodingKey {
            case startTime
            case taskId
            case taskStatus
        }
    }

    public struct AuditMitigationActionsTaskTarget: AWSEncodableShape & AWSDecodableShape {
        /// Specifies a filter in the form of an audit check and set of reason codes that identify the findings from the audit to which the audit mitigation actions task apply.
        public let auditCheckToReasonCodeFilter: [String: [String]]?
        /// If the task will apply a mitigation action to findings from a specific audit, this value uniquely identifies the audit.
        public let auditTaskId: String?
        /// If the task will apply a mitigation action to one or more listed findings, this value uniquely identifies those findings.
        public let findingIds: [String]?

        public init(auditCheckToReasonCodeFilter: [String: [String]]? = nil, auditTaskId: String? = nil, findingIds: [String]? = nil) {
            self.auditCheckToReasonCodeFilter = auditCheckToReasonCodeFilter
            self.auditTaskId = auditTaskId
            self.findingIds = findingIds
        }

        public func validate(name: String) throws {
            try self.auditCheckToReasonCodeFilter?.forEach {
                try validate($0.value, name: "auditCheckToReasonCodeFilter[\"\($0.key)\"]", parent: name, max: 25)
                try validate($0.value, name: "auditCheckToReasonCodeFilter[\"\($0.key)\"]", parent: name, min: 1)
            }
            try self.validate(self.auditTaskId, name: "auditTaskId", parent: name, max: 40)
            try self.validate(self.auditTaskId, name: "auditTaskId", parent: name, min: 1)
            try self.validate(self.auditTaskId, name: "auditTaskId", parent: name, pattern: "[a-zA-Z0-9\\-]+")
            try self.findingIds?.forEach {
                try validate($0, name: "findingIds[]", parent: name, max: 128)
                try validate($0, name: "findingIds[]", parent: name, min: 1)
                try validate($0, name: "findingIds[]", parent: name, pattern: "[a-zA-Z0-9_-]+")
            }
            try self.validate(self.findingIds, name: "findingIds", parent: name, max: 25)
            try self.validate(self.findingIds, name: "findingIds", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case auditCheckToReasonCodeFilter
            case auditTaskId
            case findingIds
        }
    }

    public struct AuditNotificationTarget: AWSEncodableShape & AWSDecodableShape {
        /// True if notifications to the target are enabled.
        public let enabled: Bool?
        /// The ARN of the role that grants permission to send notifications to the target.
        public let roleArn: String?
        /// The ARN of the target (SNS topic) to which audit notifications are sent.
        public let targetArn: String?

        public init(enabled: Bool? = nil, roleArn: String? = nil, targetArn: String? = nil) {
            self.enabled = enabled
            self.roleArn = roleArn
            self.targetArn = targetArn
        }

        public func validate(name: String) throws {
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 20)
            try self.validate(self.targetArn, name: "targetArn", parent: name, max: 2048)
        }

        private enum CodingKeys: String, CodingKey {
            case enabled
            case roleArn
            case targetArn
        }
    }

    public struct AuditSuppression: AWSDecodableShape {
        public let checkName: String
        ///  The description of the audit suppression.
        public let description: String?
        ///  The expiration date (epoch timestamp in seconds) that you want the suppression to adhere to.
        public let expirationDate: Date?
        public let resourceIdentifier: ResourceIdentifier
        ///  Indicates whether a suppression should exist indefinitely or not.
        public let suppressIndefinitely: Bool?

        public init(checkName: String, description: String? = nil, expirationDate: Date? = nil, resourceIdentifier: ResourceIdentifier, suppressIndefinitely: Bool? = nil) {
            self.checkName = checkName
            self.description = description
            self.expirationDate = expirationDate
            self.resourceIdentifier = resourceIdentifier
            self.suppressIndefinitely = suppressIndefinitely
        }

        private enum CodingKeys: String, CodingKey {
            case checkName
            case description
            case expirationDate
            case resourceIdentifier
            case suppressIndefinitely
        }
    }

    public struct AuditTaskMetadata: AWSDecodableShape {
        /// The ID of this audit.
        public let taskId: String?
        /// The status of this audit. One of "IN_PROGRESS", "COMPLETED", "FAILED", or "CANCELED".
        public let taskStatus: AuditTaskStatus?
        /// The type of this audit. One of "ON_DEMAND_AUDIT_TASK" or "SCHEDULED_AUDIT_TASK".
        public let taskType: AuditTaskType?

        public init(taskId: String? = nil, taskStatus: AuditTaskStatus? = nil, taskType: AuditTaskType? = nil) {
            self.taskId = taskId
            self.taskStatus = taskStatus
            self.taskType = taskType
        }

        private enum CodingKeys: String, CodingKey {
            case taskId
            case taskStatus
            case taskType
        }
    }

    public struct AuthInfo: AWSEncodableShape & AWSDecodableShape {
        /// The type of action for which the principal is being authorized.
        public let actionType: ActionType?
        /// The resources for which the principal is being authorized to perform the specified action.
        public let resources: [String]

        public init(actionType: ActionType? = nil, resources: [String]) {
            self.actionType = actionType
            self.resources = resources
        }

        public func validate(name: String) throws {
            try self.resources.forEach {
                try validate($0, name: "resources[]", parent: name, max: 2048)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case actionType
            case resources
        }
    }

    public struct AuthResult: AWSDecodableShape {
        /// The policies and statements that allowed the specified action.
        public let allowed: Allowed?
        /// The final authorization decision of this scenario. Multiple statements are taken into account when determining the authorization decision. An explicit deny statement can override multiple allow statements.
        public let authDecision: AuthDecision?
        /// Authorization information.
        public let authInfo: AuthInfo?
        /// The policies and statements that denied the specified action.
        public let denied: Denied?
        /// Contains any missing context values found while evaluating policy.
        public let missingContextValues: [String]?

        public init(allowed: Allowed? = nil, authDecision: AuthDecision? = nil, authInfo: AuthInfo? = nil, denied: Denied? = nil, missingContextValues: [String]? = nil) {
            self.allowed = allowed
            self.authDecision = authDecision
            self.authInfo = authInfo
            self.denied = denied
            self.missingContextValues = missingContextValues
        }

        private enum CodingKeys: String, CodingKey {
            case allowed
            case authDecision
            case authInfo
            case denied
            case missingContextValues
        }
    }

    public struct AuthorizerConfig: AWSEncodableShape & AWSDecodableShape {
        /// A Boolean that specifies whether the domain configuration's authorization service can be overridden.
        public let allowAuthorizerOverride: Bool?
        /// The name of the authorization service for a domain configuration.
        public let defaultAuthorizerName: String?

        public init(allowAuthorizerOverride: Bool? = nil, defaultAuthorizerName: String? = nil) {
            self.allowAuthorizerOverride = allowAuthorizerOverride
            self.defaultAuthorizerName = defaultAuthorizerName
        }

        public func validate(name: String) throws {
            try self.validate(self.defaultAuthorizerName, name: "defaultAuthorizerName", parent: name, max: 128)
            try self.validate(self.defaultAuthorizerName, name: "defaultAuthorizerName", parent: name, min: 1)
            try self.validate(self.defaultAuthorizerName, name: "defaultAuthorizerName", parent: name, pattern: "[\\w=,@-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case allowAuthorizerOverride
            case defaultAuthorizerName
        }
    }

    public struct AuthorizerDescription: AWSDecodableShape {
        /// The authorizer ARN.
        public let authorizerArn: String?
        /// The authorizer's Lambda function ARN.
        public let authorizerFunctionArn: String?
        /// The authorizer name.
        public let authorizerName: String?
        /// The UNIX timestamp of when the authorizer was created.
        public let creationDate: Date?
        /// The UNIX timestamp of when the authorizer was last updated.
        public let lastModifiedDate: Date?
        /// Specifies whether AWS IoT validates the token signature in an authorization request.
        public let signingDisabled: Bool?
        /// The status of the authorizer.
        public let status: AuthorizerStatus?
        /// The key used to extract the token from the HTTP headers.
        public let tokenKeyName: String?
        /// The public keys used to validate the token signature returned by your custom authentication service.
        public let tokenSigningPublicKeys: [String: String]?

        public init(authorizerArn: String? = nil, authorizerFunctionArn: String? = nil, authorizerName: String? = nil, creationDate: Date? = nil, lastModifiedDate: Date? = nil, signingDisabled: Bool? = nil, status: AuthorizerStatus? = nil, tokenKeyName: String? = nil, tokenSigningPublicKeys: [String: String]? = nil) {
            self.authorizerArn = authorizerArn
            self.authorizerFunctionArn = authorizerFunctionArn
            self.authorizerName = authorizerName
            self.creationDate = creationDate
            self.lastModifiedDate = lastModifiedDate
            self.signingDisabled = signingDisabled
            self.status = status
            self.tokenKeyName = tokenKeyName
            self.tokenSigningPublicKeys = tokenSigningPublicKeys
        }

        private enum CodingKeys: String, CodingKey {
            case authorizerArn
            case authorizerFunctionArn
            case authorizerName
            case creationDate
            case lastModifiedDate
            case signingDisabled
            case status
            case tokenKeyName
            case tokenSigningPublicKeys
        }
    }

    public struct AuthorizerSummary: AWSDecodableShape {
        /// The authorizer ARN.
        public let authorizerArn: String?
        /// The authorizer name.
        public let authorizerName: String?

        public init(authorizerArn: String? = nil, authorizerName: String? = nil) {
            self.authorizerArn = authorizerArn
            self.authorizerName = authorizerName
        }

        private enum CodingKeys: String, CodingKey {
            case authorizerArn
            case authorizerName
        }
    }

    public struct AwsJobAbortConfig: AWSEncodableShape {
        /// The list of criteria that determine when and how to abort the job.
        public let abortCriteriaList: [AwsJobAbortCriteria]

        public init(abortCriteriaList: [AwsJobAbortCriteria]) {
            self.abortCriteriaList = abortCriteriaList
        }

        public func validate(name: String) throws {
            try self.abortCriteriaList.forEach {
                try $0.validate(name: "\(name).abortCriteriaList[]")
            }
            try self.validate(self.abortCriteriaList, name: "abortCriteriaList", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case abortCriteriaList
        }
    }

    public struct AwsJobAbortCriteria: AWSEncodableShape {
        /// The type of job action to take to initiate the job abort.
        public let action: AwsJobAbortCriteriaAbortAction
        /// The type of job execution failures that can initiate a job abort.
        public let failureType: AwsJobAbortCriteriaFailureType
        /// The minimum number of things which must receive job execution notifications before the job can be aborted.
        public let minNumberOfExecutedThings: Int
        /// The minimum percentage of job execution failures that must occur to initiate the job abort. AWS IoT supports up to two digits after the decimal (for example, 10.9 and 10.99, but not 10.999).
        public let thresholdPercentage: Double

        public init(action: AwsJobAbortCriteriaAbortAction, failureType: AwsJobAbortCriteriaFailureType, minNumberOfExecutedThings: Int, thresholdPercentage: Double) {
            self.action = action
            self.failureType = failureType
            self.minNumberOfExecutedThings = minNumberOfExecutedThings
            self.thresholdPercentage = thresholdPercentage
        }

        public func validate(name: String) throws {
            try self.validate(self.minNumberOfExecutedThings, name: "minNumberOfExecutedThings", parent: name, min: 1)
            try self.validate(self.thresholdPercentage, name: "thresholdPercentage", parent: name, max: 100)
        }

        private enum CodingKeys: String, CodingKey {
            case action
            case failureType
            case minNumberOfExecutedThings
            case thresholdPercentage
        }
    }

    public struct AwsJobExecutionsRolloutConfig: AWSEncodableShape & AWSDecodableShape {
        /// The rate of increase for a job rollout. This parameter allows you to define an exponential rate increase for a job rollout.
        public let exponentialRate: AwsJobExponentialRolloutRate?
        /// The maximum number of OTA update job executions started per minute.
        public let maximumPerMinute: Int?

        public init(exponentialRate: AwsJobExponentialRolloutRate? = nil, maximumPerMinute: Int? = nil) {
            self.exponentialRate = exponentialRate
            self.maximumPerMinute = maximumPerMinute
        }

        public func validate(name: String) throws {
            try self.exponentialRate?.validate(name: "\(name).exponentialRate")
            try self.validate(self.maximumPerMinute, name: "maximumPerMinute", parent: name, max: 1000)
            try self.validate(self.maximumPerMinute, name: "maximumPerMinute", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case exponentialRate
            case maximumPerMinute
        }
    }

    public struct AwsJobExponentialRolloutRate: AWSEncodableShape & AWSDecodableShape {
        /// The minimum number of things that will be notified of a pending job, per minute, at the start of the job rollout. This is the initial rate of the rollout.
        public let baseRatePerMinute: Int
        /// The rate of increase for a job rollout. The number of things notified is multiplied by this factor.
        public let incrementFactor: Double
        /// The criteria to initiate the increase in rate of rollout for a job. AWS IoT supports up to one digit after the decimal (for example, 1.5, but not 1.55).
        public let rateIncreaseCriteria: AwsJobRateIncreaseCriteria

        public init(baseRatePerMinute: Int, incrementFactor: Double, rateIncreaseCriteria: AwsJobRateIncreaseCriteria) {
            self.baseRatePerMinute = baseRatePerMinute
            self.incrementFactor = incrementFactor
            self.rateIncreaseCriteria = rateIncreaseCriteria
        }

        public func validate(name: String) throws {
            try self.validate(self.baseRatePerMinute, name: "baseRatePerMinute", parent: name, max: 1000)
            try self.validate(self.baseRatePerMinute, name: "baseRatePerMinute", parent: name, min: 1)
            try self.rateIncreaseCriteria.validate(name: "\(name).rateIncreaseCriteria")
        }

        private enum CodingKeys: String, CodingKey {
            case baseRatePerMinute
            case incrementFactor
            case rateIncreaseCriteria
        }
    }

    public struct AwsJobPresignedUrlConfig: AWSEncodableShape & AWSDecodableShape {
        /// How long (in seconds) pre-signed URLs are valid. Valid values are 60 - 3600, the default value is 1800 seconds. Pre-signed URLs are generated when a request for the job document is received.
        public let expiresInSec: Int64?

        public init(expiresInSec: Int64? = nil) {
            self.expiresInSec = expiresInSec
        }

        private enum CodingKeys: String, CodingKey {
            case expiresInSec
        }
    }

    public struct AwsJobRateIncreaseCriteria: AWSEncodableShape & AWSDecodableShape {
        /// When this number of things have been notified, it will initiate an increase in the rollout rate.
        public let numberOfNotifiedThings: Int?
        /// When this number of things have succeeded in their job execution, it will initiate an increase in the rollout rate.
        public let numberOfSucceededThings: Int?

        public init(numberOfNotifiedThings: Int? = nil, numberOfSucceededThings: Int? = nil) {
            self.numberOfNotifiedThings = numberOfNotifiedThings
            self.numberOfSucceededThings = numberOfSucceededThings
        }

        public func validate(name: String) throws {
            try self.validate(self.numberOfNotifiedThings, name: "numberOfNotifiedThings", parent: name, min: 1)
            try self.validate(self.numberOfSucceededThings, name: "numberOfSucceededThings", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case numberOfNotifiedThings
            case numberOfSucceededThings
        }
    }

    public struct AwsJobTimeoutConfig: AWSEncodableShape {
        /// Specifies the amount of time, in minutes, this device has to finish execution of this job. The timeout interval can be anywhere between 1 minute and 7 days (1 to 10080 minutes). The in progress timer can't be updated and will apply to all job executions for the job. Whenever a job execution remains in the IN_PROGRESS status for longer than this interval, the job execution will fail and switch to the terminal TIMED_OUT status.
        public let inProgressTimeoutInMinutes: Int64?

        public init(inProgressTimeoutInMinutes: Int64? = nil) {
            self.inProgressTimeoutInMinutes = inProgressTimeoutInMinutes
        }

        private enum CodingKeys: String, CodingKey {
            case inProgressTimeoutInMinutes
        }
    }

    public struct Behavior: AWSEncodableShape & AWSDecodableShape {
        /// The criteria that determine if a device is behaving normally in regard to the metric.
        public let criteria: BehaviorCriteria?
        /// What is measured by the behavior.
        public let metric: String?
        /// The dimension for a metric in your behavior. For example, using a TOPIC_FILTER dimension, you can narrow down the scope of the metric to only MQTT topics where the name matches the pattern specified in the dimension. This can't be used with custom metrics.
        public let metricDimension: MetricDimension?
        /// The name you've given to the behavior.
        public let name: String
        ///  Suppresses alerts.
        public let suppressAlerts: Bool?

        public init(criteria: BehaviorCriteria? = nil, metric: String? = nil, metricDimension: MetricDimension? = nil, name: String, suppressAlerts: Bool? = nil) {
            self.criteria = criteria
            self.metric = metric
            self.metricDimension = metricDimension
            self.name = name
            self.suppressAlerts = suppressAlerts
        }

        public func validate(name: String) throws {
            try self.criteria?.validate(name: "\(name).criteria")
            try self.metricDimension?.validate(name: "\(name).metricDimension")
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case criteria
            case metric
            case metricDimension
            case name
            case suppressAlerts
        }
    }

    public struct BehaviorCriteria: AWSEncodableShape & AWSDecodableShape {
        /// The operator that relates the thing measured (metric) to the criteria (containing a value or statisticalThreshold). Valid operators include:    string-list: in-set and not-in-set     number-list: in-set and not-in-set     ip-address-list: in-cidr-set and not-in-cidr-set     number: less-than, less-than-equals, greater-than, and greater-than-equals
        public let comparisonOperator: ComparisonOperator?
        /// If a device is in violation of the behavior for the specified number of consecutive datapoints, an alarm occurs. If not specified, the default is 1.
        public let consecutiveDatapointsToAlarm: Int?
        /// If an alarm has occurred and the offending device is no longer in violation of the behavior for the specified number of consecutive datapoints, the alarm is cleared. If not specified, the default is 1.
        public let consecutiveDatapointsToClear: Int?
        /// Use this to specify the time duration over which the behavior is evaluated, for those criteria that have a time dimension (for example, NUM_MESSAGES_SENT). For a statisticalThreshhold metric comparison, measurements from all devices are accumulated over this time duration before being used to calculate percentiles, and later, measurements from an individual device are also accumulated over this time duration before being given a percentile rank. Cannot be used with list-based metric datatypes.
        public let durationSeconds: Int?
        ///  The configuration of an ML Detect
        public let mlDetectionConfig: MachineLearningDetectionConfig?
        /// A statistical ranking (percentile)that indicates a threshold value by which a behavior is determined to be in compliance or in violation of the behavior.
        public let statisticalThreshold: StatisticalThreshold?
        /// The value to be compared with the metric.
        public let value: MetricValue?

        public init(comparisonOperator: ComparisonOperator? = nil, consecutiveDatapointsToAlarm: Int? = nil, consecutiveDatapointsToClear: Int? = nil, durationSeconds: Int? = nil, mlDetectionConfig: MachineLearningDetectionConfig? = nil, statisticalThreshold: StatisticalThreshold? = nil, value: MetricValue? = nil) {
            self.comparisonOperator = comparisonOperator
            self.consecutiveDatapointsToAlarm = consecutiveDatapointsToAlarm
            self.consecutiveDatapointsToClear = consecutiveDatapointsToClear
            self.durationSeconds = durationSeconds
            self.mlDetectionConfig = mlDetectionConfig
            self.statisticalThreshold = statisticalThreshold
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.consecutiveDatapointsToAlarm, name: "consecutiveDatapointsToAlarm", parent: name, max: 10)
            try self.validate(self.consecutiveDatapointsToAlarm, name: "consecutiveDatapointsToAlarm", parent: name, min: 1)
            try self.validate(self.consecutiveDatapointsToClear, name: "consecutiveDatapointsToClear", parent: name, max: 10)
            try self.validate(self.consecutiveDatapointsToClear, name: "consecutiveDatapointsToClear", parent: name, min: 1)
            try self.statisticalThreshold?.validate(name: "\(name).statisticalThreshold")
            try self.value?.validate(name: "\(name).value")
        }

        private enum CodingKeys: String, CodingKey {
            case comparisonOperator
            case consecutiveDatapointsToAlarm
            case consecutiveDatapointsToClear
            case durationSeconds
            case mlDetectionConfig
            case statisticalThreshold
            case value
        }
    }

    public struct BehaviorModelTrainingSummary: AWSDecodableShape {
        ///  The name of the behavior.
        public let behaviorName: String?
        ///  The percentage of datapoints collected.
        public let datapointsCollectionPercentage: Double?
        ///  The date the model was last refreshed.
        public let lastModelRefreshDate: Date?
        ///  The status of the behavior model.
        public let modelStatus: ModelStatus?
        ///  The name of the security profile.
        public let securityProfileName: String?
        ///  The date a training model started collecting data.
        public let trainingDataCollectionStartDate: Date?

        public init(behaviorName: String? = nil, datapointsCollectionPercentage: Double? = nil, lastModelRefreshDate: Date? = nil, modelStatus: ModelStatus? = nil, securityProfileName: String? = nil, trainingDataCollectionStartDate: Date? = nil) {
            self.behaviorName = behaviorName
            self.datapointsCollectionPercentage = datapointsCollectionPercentage
            self.lastModelRefreshDate = lastModelRefreshDate
            self.modelStatus = modelStatus
            self.securityProfileName = securityProfileName
            self.trainingDataCollectionStartDate = trainingDataCollectionStartDate
        }

        private enum CodingKeys: String, CodingKey {
            case behaviorName
            case datapointsCollectionPercentage
            case lastModelRefreshDate
            case modelStatus
            case securityProfileName
            case trainingDataCollectionStartDate
        }
    }

    public struct BillingGroupMetadata: AWSDecodableShape {
        /// The date the billing group was created.
        public let creationDate: Date?

        public init(creationDate: Date? = nil) {
            self.creationDate = creationDate
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate
        }
    }

    public struct BillingGroupProperties: AWSEncodableShape & AWSDecodableShape {
        /// The description of the billing group.
        public let billingGroupDescription: String?

        public init(billingGroupDescription: String? = nil) {
            self.billingGroupDescription = billingGroupDescription
        }

        public func validate(name: String) throws {
            try self.validate(self.billingGroupDescription, name: "billingGroupDescription", parent: name, max: 2028)
            try self.validate(self.billingGroupDescription, name: "billingGroupDescription", parent: name, pattern: "[\\p{Graph}\\x20]*")
        }

        private enum CodingKeys: String, CodingKey {
            case billingGroupDescription
        }
    }

    public struct CACertificate: AWSDecodableShape {
        /// The ARN of the CA certificate.
        public let certificateArn: String?
        /// The ID of the CA certificate.
        public let certificateId: String?
        /// The date the CA certificate was created.
        public let creationDate: Date?
        /// The status of the CA certificate. The status value REGISTER_INACTIVE is deprecated and should not be used.
        public let status: CACertificateStatus?

        public init(certificateArn: String? = nil, certificateId: String? = nil, creationDate: Date? = nil, status: CACertificateStatus? = nil) {
            self.certificateArn = certificateArn
            self.certificateId = certificateId
            self.creationDate = creationDate
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case certificateArn
            case certificateId
            case creationDate
            case status
        }
    }

    public struct CACertificateDescription: AWSDecodableShape {
        /// Whether the CA certificate configured for auto registration of device certificates. Valid values are "ENABLE" and "DISABLE"
        public let autoRegistrationStatus: AutoRegistrationStatus?
        /// The CA certificate ARN.
        public let certificateArn: String?
        /// The CA certificate ID.
        public let certificateId: String?
        /// The CA certificate data, in PEM format.
        public let certificatePem: String?
        /// The date the CA certificate was created.
        public let creationDate: Date?
        /// The customer version of the CA certificate.
        public let customerVersion: Int?
        /// The generation ID of the CA certificate.
        public let generationId: String?
        /// The date the CA certificate was last modified.
        public let lastModifiedDate: Date?
        /// The owner of the CA certificate.
        public let ownedBy: String?
        /// The status of a CA certificate.
        public let status: CACertificateStatus?
        /// When the CA certificate is valid.
        public let validity: CertificateValidity?

        public init(autoRegistrationStatus: AutoRegistrationStatus? = nil, certificateArn: String? = nil, certificateId: String? = nil, certificatePem: String? = nil, creationDate: Date? = nil, customerVersion: Int? = nil, generationId: String? = nil, lastModifiedDate: Date? = nil, ownedBy: String? = nil, status: CACertificateStatus? = nil, validity: CertificateValidity? = nil) {
            self.autoRegistrationStatus = autoRegistrationStatus
            self.certificateArn = certificateArn
            self.certificateId = certificateId
            self.certificatePem = certificatePem
            self.creationDate = creationDate
            self.customerVersion = customerVersion
            self.generationId = generationId
            self.lastModifiedDate = lastModifiedDate
            self.ownedBy = ownedBy
            self.status = status
            self.validity = validity
        }

        private enum CodingKeys: String, CodingKey {
            case autoRegistrationStatus
            case certificateArn
            case certificateId
            case certificatePem
            case creationDate
            case customerVersion
            case generationId
            case lastModifiedDate
            case ownedBy
            case status
            case validity
        }
    }

    public struct CancelAuditMitigationActionsTaskRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "taskId", location: .uri(locationName: "taskId"))
        ]

        /// The unique identifier for the task that you want to cancel.
        public let taskId: String

        public init(taskId: String) {
            self.taskId = taskId
        }

        public func validate(name: String) throws {
            try self.validate(self.taskId, name: "taskId", parent: name, max: 128)
            try self.validate(self.taskId, name: "taskId", parent: name, min: 1)
            try self.validate(self.taskId, name: "taskId", parent: name, pattern: "[a-zA-Z0-9_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct CancelAuditMitigationActionsTaskResponse: AWSDecodableShape {
        public init() {}
    }

    public struct CancelAuditTaskRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "taskId", location: .uri(locationName: "taskId"))
        ]

        /// The ID of the audit you want to cancel. You can only cancel an audit that is "IN_PROGRESS".
        public let taskId: String

        public init(taskId: String) {
            self.taskId = taskId
        }

        public func validate(name: String) throws {
            try self.validate(self.taskId, name: "taskId", parent: name, max: 40)
            try self.validate(self.taskId, name: "taskId", parent: name, min: 1)
            try self.validate(self.taskId, name: "taskId", parent: name, pattern: "[a-zA-Z0-9\\-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct CancelAuditTaskResponse: AWSDecodableShape {
        public init() {}
    }

    public struct CancelCertificateTransferRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "certificateId", location: .uri(locationName: "certificateId"))
        ]

        /// The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)
        public let certificateId: String

        public init(certificateId: String) {
            self.certificateId = certificateId
        }

        public func validate(name: String) throws {
            try self.validate(self.certificateId, name: "certificateId", parent: name, max: 64)
            try self.validate(self.certificateId, name: "certificateId", parent: name, min: 64)
            try self.validate(self.certificateId, name: "certificateId", parent: name, pattern: "(0x)?[a-fA-F0-9]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct CancelDetectMitigationActionsTaskRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "taskId", location: .uri(locationName: "taskId"))
        ]

        ///  The unique identifier of the task.
        public let taskId: String

        public init(taskId: String) {
            self.taskId = taskId
        }

        public func validate(name: String) throws {
            try self.validate(self.taskId, name: "taskId", parent: name, max: 128)
            try self.validate(self.taskId, name: "taskId", parent: name, min: 1)
            try self.validate(self.taskId, name: "taskId", parent: name, pattern: "[a-zA-Z0-9_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct CancelDetectMitigationActionsTaskResponse: AWSDecodableShape {
        public init() {}
    }

    public struct CancelJobExecutionRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "force", location: .querystring(locationName: "force")),
            AWSMemberEncoding(label: "jobId", location: .uri(locationName: "jobId")),
            AWSMemberEncoding(label: "thingName", location: .uri(locationName: "thingName"))
        ]

        /// (Optional) The expected current version of the job execution. Each time you update the job execution, its version is incremented. If the version of the job execution stored in Jobs does not match, the update is rejected with a VersionMismatch error, and an ErrorResponse that contains the current job execution status data is returned. (This makes it unnecessary to perform a separate DescribeJobExecution request in order to obtain the job execution status data.)
        public let expectedVersion: Int64?
        /// (Optional) If true the job execution will be canceled if it has status IN_PROGRESS or QUEUED, otherwise the job execution will be canceled only if it has status QUEUED. If you attempt to cancel a job execution that is IN_PROGRESS, and you do not set force to true, then an InvalidStateTransitionException will be thrown. The default is false. Canceling a job execution which is "IN_PROGRESS", will cause the device to be unable to update the job execution status. Use caution and ensure that the device is able to recover to a valid state.
        public let force: Bool?
        /// The ID of the job to be canceled.
        public let jobId: String
        /// A collection of name/value pairs that describe the status of the job execution. If not specified, the statusDetails are unchanged. You can specify at most 10 name/value pairs.
        public let statusDetails: [String: String]?
        /// The name of the thing whose execution of the job will be canceled.
        public let thingName: String

        public init(expectedVersion: Int64? = nil, force: Bool? = nil, jobId: String, statusDetails: [String: String]? = nil, thingName: String) {
            self.expectedVersion = expectedVersion
            self.force = force
            self.jobId = jobId
            self.statusDetails = statusDetails
            self.thingName = thingName
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 64)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "[a-zA-Z0-9_-]+")
            try self.statusDetails?.forEach {
                try validate($0.key, name: "statusDetails.key", parent: name, max: 128)
                try validate($0.key, name: "statusDetails.key", parent: name, min: 1)
                try validate($0.key, name: "statusDetails.key", parent: name, pattern: "[a-zA-Z0-9:_-]+")
                try validate($0.value, name: "statusDetails[\"\($0.key)\"]", parent: name, min: 1)
                try validate($0.value, name: "statusDetails[\"\($0.key)\"]", parent: name, pattern: "[^\\p{C}]+")
            }
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case expectedVersion
            case statusDetails
        }
    }

    public struct CancelJobRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "force", location: .querystring(locationName: "force")),
            AWSMemberEncoding(label: "jobId", location: .uri(locationName: "jobId"))
        ]

        /// An optional comment string describing why the job was canceled.
        public let comment: String?
        /// (Optional) If true job executions with status "IN_PROGRESS" and "QUEUED" are canceled, otherwise only job executions with status "QUEUED" are canceled. The default is false. Canceling a job which is "IN_PROGRESS", will cause a device which is executing the job to be unable to update the job execution status. Use caution and ensure that each device executing a job which is canceled is able to recover to a valid state.
        public let force: Bool?
        /// The unique identifier you assigned to this job when it was created.
        public let jobId: String
        /// (Optional)A reason code string that explains why the job was canceled.
        public let reasonCode: String?

        public init(comment: String? = nil, force: Bool? = nil, jobId: String, reasonCode: String? = nil) {
            self.comment = comment
            self.force = force
            self.jobId = jobId
            self.reasonCode = reasonCode
        }

        public func validate(name: String) throws {
            try self.validate(self.comment, name: "comment", parent: name, max: 2028)
            try self.validate(self.comment, name: "comment", parent: name, pattern: "[^\\p{C}]+")
            try self.validate(self.jobId, name: "jobId", parent: name, max: 64)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "[a-zA-Z0-9_-]+")
            try self.validate(self.reasonCode, name: "reasonCode", parent: name, max: 128)
            try self.validate(self.reasonCode, name: "reasonCode", parent: name, pattern: "[\\p{Upper}\\p{Digit}_]+")
        }

        private enum CodingKeys: String, CodingKey {
            case comment
            case reasonCode
        }
    }

    public struct CancelJobResponse: AWSDecodableShape {
        /// A short text description of the job.
        public let description: String?
        /// The job ARN.
        public let jobArn: String?
        /// The unique identifier you assigned to this job when it was created.
        public let jobId: String?

        public init(description: String? = nil, jobArn: String? = nil, jobId: String? = nil) {
            self.description = description
            self.jobArn = jobArn
            self.jobId = jobId
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case jobArn
            case jobId
        }
    }

    public struct Certificate: AWSDecodableShape {
        /// The ARN of the certificate.
        public let certificateArn: String?
        /// The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)
        public let certificateId: String?
        /// The mode of the certificate.
        public let certificateMode: CertificateMode?
        /// The date and time the certificate was created.
        public let creationDate: Date?
        /// The status of the certificate. The status value REGISTER_INACTIVE is deprecated and should not be used.
        public let status: CertificateStatus?

        public init(certificateArn: String? = nil, certificateId: String? = nil, certificateMode: CertificateMode? = nil, creationDate: Date? = nil, status: CertificateStatus? = nil) {
            self.certificateArn = certificateArn
            self.certificateId = certificateId
            self.certificateMode = certificateMode
            self.creationDate = creationDate
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case certificateArn
            case certificateId
            case certificateMode
            case creationDate
            case status
        }
    }

    public struct CertificateDescription: AWSDecodableShape {
        /// The certificate ID of the CA certificate used to sign this certificate.
        public let caCertificateId: String?
        /// The ARN of the certificate.
        public let certificateArn: String?
        /// The ID of the certificate.
        public let certificateId: String?
        /// The mode of the certificate.
        public let certificateMode: CertificateMode?
        /// The certificate data, in PEM format.
        public let certificatePem: String?
        /// The date and time the certificate was created.
        public let creationDate: Date?
        /// The customer version of the certificate.
        public let customerVersion: Int?
        /// The generation ID of the certificate.
        public let generationId: String?
        /// The date and time the certificate was last modified.
        public let lastModifiedDate: Date?
        /// The ID of the AWS account that owns the certificate.
        public let ownedBy: String?
        /// The ID of the AWS account of the previous owner of the certificate.
        public let previousOwnedBy: String?
        /// The status of the certificate.
        public let status: CertificateStatus?
        /// The transfer data.
        public let transferData: TransferData?
        /// When the certificate is valid.
        public let validity: CertificateValidity?

        public init(caCertificateId: String? = nil, certificateArn: String? = nil, certificateId: String? = nil, certificateMode: CertificateMode? = nil, certificatePem: String? = nil, creationDate: Date? = nil, customerVersion: Int? = nil, generationId: String? = nil, lastModifiedDate: Date? = nil, ownedBy: String? = nil, previousOwnedBy: String? = nil, status: CertificateStatus? = nil, transferData: TransferData? = nil, validity: CertificateValidity? = nil) {
            self.caCertificateId = caCertificateId
            self.certificateArn = certificateArn
            self.certificateId = certificateId
            self.certificateMode = certificateMode
            self.certificatePem = certificatePem
            self.creationDate = creationDate
            self.customerVersion = customerVersion
            self.generationId = generationId
            self.lastModifiedDate = lastModifiedDate
            self.ownedBy = ownedBy
            self.previousOwnedBy = previousOwnedBy
            self.status = status
            self.transferData = transferData
            self.validity = validity
        }

        private enum CodingKeys: String, CodingKey {
            case caCertificateId
            case certificateArn
            case certificateId
            case certificateMode
            case certificatePem
            case creationDate
            case customerVersion
            case generationId
            case lastModifiedDate
            case ownedBy
            case previousOwnedBy
            case status
            case transferData
            case validity
        }
    }

    public struct CertificateValidity: AWSDecodableShape {
        /// The certificate is not valid after this date.
        public let notAfter: Date?
        /// The certificate is not valid before this date.
        public let notBefore: Date?

        public init(notAfter: Date? = nil, notBefore: Date? = nil) {
            self.notAfter = notAfter
            self.notBefore = notBefore
        }

        private enum CodingKeys: String, CodingKey {
            case notAfter
            case notBefore
        }
    }

    public struct ClearDefaultAuthorizerRequest: AWSEncodableShape {
        public init() {}
    }

    public struct ClearDefaultAuthorizerResponse: AWSDecodableShape {
        public init() {}
    }

    public struct CloudwatchAlarmAction: AWSEncodableShape & AWSDecodableShape {
        /// The CloudWatch alarm name.
        public let alarmName: String
        /// The IAM role that allows access to the CloudWatch alarm.
        public let roleArn: String
        /// The reason for the alarm change.
        public let stateReason: String
        /// The value of the alarm state. Acceptable values are: OK, ALARM, INSUFFICIENT_DATA.
        public let stateValue: String

        public init(alarmName: String, roleArn: String, stateReason: String, stateValue: String) {
            self.alarmName = alarmName
            self.roleArn = roleArn
            self.stateReason = stateReason
            self.stateValue = stateValue
        }

        private enum CodingKeys: String, CodingKey {
            case alarmName
            case roleArn
            case stateReason
            case stateValue
        }
    }

    public struct CloudwatchLogsAction: AWSEncodableShape & AWSDecodableShape {
        /// The CloudWatch log group to which the action sends data.
        public let logGroupName: String
        /// The IAM role that allows access to the CloudWatch log.
        public let roleArn: String

        public init(logGroupName: String, roleArn: String) {
            self.logGroupName = logGroupName
            self.roleArn = roleArn
        }

        private enum CodingKeys: String, CodingKey {
            case logGroupName
            case roleArn
        }
    }

    public struct CloudwatchMetricAction: AWSEncodableShape & AWSDecodableShape {
        /// The CloudWatch metric name.
        public let metricName: String
        /// The CloudWatch metric namespace name.
        public let metricNamespace: String
        /// An optional Unix timestamp.
        public let metricTimestamp: String?
        /// The metric unit supported by CloudWatch.
        public let metricUnit: String
        /// The CloudWatch metric value.
        public let metricValue: String
        /// The IAM role that allows access to the CloudWatch metric.
        public let roleArn: String

        public init(metricName: String, metricNamespace: String, metricTimestamp: String? = nil, metricUnit: String, metricValue: String, roleArn: String) {
            self.metricName = metricName
            self.metricNamespace = metricNamespace
            self.metricTimestamp = metricTimestamp
            self.metricUnit = metricUnit
            self.metricValue = metricValue
            self.roleArn = roleArn
        }

        private enum CodingKeys: String, CodingKey {
            case metricName
            case metricNamespace
            case metricTimestamp
            case metricUnit
            case metricValue
            case roleArn
        }
    }

    public struct CodeSigning: AWSEncodableShape & AWSDecodableShape {
        /// The ID of the AWSSignerJob which was created to sign the file.
        public let awsSignerJobId: String?
        /// A custom method for code signing a file.
        public let customCodeSigning: CustomCodeSigning?
        /// Describes the code-signing job.
        public let startSigningJobParameter: StartSigningJobParameter?

        public init(awsSignerJobId: String? = nil, customCodeSigning: CustomCodeSigning? = nil, startSigningJobParameter: StartSigningJobParameter? = nil) {
            self.awsSignerJobId = awsSignerJobId
            self.customCodeSigning = customCodeSigning
            self.startSigningJobParameter = startSigningJobParameter
        }

        public func validate(name: String) throws {
            try self.startSigningJobParameter?.validate(name: "\(name).startSigningJobParameter")
        }

        private enum CodingKeys: String, CodingKey {
            case awsSignerJobId
            case customCodeSigning
            case startSigningJobParameter
        }
    }

    public struct CodeSigningCertificateChain: AWSEncodableShape & AWSDecodableShape {
        /// The name of the certificate.
        public let certificateName: String?
        /// A base64 encoded binary representation of the code signing certificate chain.
        public let inlineDocument: String?

        public init(certificateName: String? = nil, inlineDocument: String? = nil) {
            self.certificateName = certificateName
            self.inlineDocument = inlineDocument
        }

        private enum CodingKeys: String, CodingKey {
            case certificateName
            case inlineDocument
        }
    }

    public struct CodeSigningSignature: AWSEncodableShape & AWSDecodableShape {
        /// A base64 encoded binary representation of the code signing signature.
        public let inlineDocument: Data?

        public init(inlineDocument: Data? = nil) {
            self.inlineDocument = inlineDocument
        }

        private enum CodingKeys: String, CodingKey {
            case inlineDocument
        }
    }

    public struct Configuration: AWSEncodableShape & AWSDecodableShape {
        /// True to enable the configuration.
        public let enabled: Bool?

        public init(enabled: Bool? = nil) {
            self.enabled = enabled
        }

        private enum CodingKeys: String, CodingKey {
            case enabled = "Enabled"
        }
    }

    public struct ConfirmTopicRuleDestinationRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "confirmationToken", location: .uri(locationName: "confirmationToken"))
        ]

        /// The token used to confirm ownership or access to the topic rule confirmation URL.
        public let confirmationToken: String

        public init(confirmationToken: String) {
            self.confirmationToken = confirmationToken
        }

        public func validate(name: String) throws {
            try self.validate(self.confirmationToken, name: "confirmationToken", parent: name, max: 2048)
            try self.validate(self.confirmationToken, name: "confirmationToken", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ConfirmTopicRuleDestinationResponse: AWSDecodableShape {
        public init() {}
    }

    public struct CreateAuditSuppressionRequest: AWSEncodableShape {
        public let checkName: String
        ///  The epoch timestamp in seconds at which this suppression expires.
        public let clientRequestToken: String
        ///  The description of the audit suppression.
        public let description: String?
        ///  The epoch timestamp in seconds at which this suppression expires.
        public let expirationDate: Date?
        public let resourceIdentifier: ResourceIdentifier
        ///  Indicates whether a suppression should exist indefinitely or not.
        public let suppressIndefinitely: Bool?

        public init(checkName: String, clientRequestToken: String = CreateAuditSuppressionRequest.idempotencyToken(), description: String? = nil, expirationDate: Date? = nil, resourceIdentifier: ResourceIdentifier, suppressIndefinitely: Bool? = nil) {
            self.checkName = checkName
            self.clientRequestToken = clientRequestToken
            self.description = description
            self.expirationDate = expirationDate
            self.resourceIdentifier = resourceIdentifier
            self.suppressIndefinitely = suppressIndefinitely
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 64)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[a-zA-Z0-9-_]+$")
            try self.validate(self.description, name: "description", parent: name, max: 1000)
            try self.validate(self.description, name: "description", parent: name, pattern: "[\\p{Graph}\\x20]*")
            try self.resourceIdentifier.validate(name: "\(name).resourceIdentifier")
        }

        private enum CodingKeys: String, CodingKey {
            case checkName
            case clientRequestToken
            case description
            case expirationDate
            case resourceIdentifier
            case suppressIndefinitely
        }
    }

    public struct CreateAuditSuppressionResponse: AWSDecodableShape {
        public init() {}
    }

    public struct CreateAuthorizerRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "authorizerName", location: .uri(locationName: "authorizerName"))
        ]

        /// The ARN of the authorizer's Lambda function.
        public let authorizerFunctionArn: String
        /// The authorizer name.
        public let authorizerName: String
        /// Specifies whether AWS IoT validates the token signature in an authorization request.
        public let signingDisabled: Bool?
        /// The status of the create authorizer request.
        public let status: AuthorizerStatus?
        /// Metadata which can be used to manage the custom authorizer.  For URI Request parameters use format: ...key1=value1&amp;key2=value2... For the CLI command-line parameter use format: &amp;&amp;tags "key1=value1&amp;key2=value2..." For the cli-input-json file use format: "tags": "key1=value1&amp;key2=value2..."
        public let tags: [Tag]?
        /// The name of the token key used to extract the token from the HTTP headers.
        public let tokenKeyName: String?
        /// The public keys used to verify the digital signature returned by your custom authentication service.
        public let tokenSigningPublicKeys: [String: String]?

        public init(authorizerFunctionArn: String, authorizerName: String, signingDisabled: Bool? = nil, status: AuthorizerStatus? = nil, tags: [Tag]? = nil, tokenKeyName: String? = nil, tokenSigningPublicKeys: [String: String]? = nil) {
            self.authorizerFunctionArn = authorizerFunctionArn
            self.authorizerName = authorizerName
            self.signingDisabled = signingDisabled
            self.status = status
            self.tags = tags
            self.tokenKeyName = tokenKeyName
            self.tokenSigningPublicKeys = tokenSigningPublicKeys
        }

        public func validate(name: String) throws {
            try self.validate(self.authorizerFunctionArn, name: "authorizerFunctionArn", parent: name, max: 2048)
            try self.validate(self.authorizerName, name: "authorizerName", parent: name, max: 128)
            try self.validate(self.authorizerName, name: "authorizerName", parent: name, min: 1)
            try self.validate(self.authorizerName, name: "authorizerName", parent: name, pattern: "[\\w=,@-]+")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.tokenKeyName, name: "tokenKeyName", parent: name, max: 128)
            try self.validate(self.tokenKeyName, name: "tokenKeyName", parent: name, min: 1)
            try self.validate(self.tokenKeyName, name: "tokenKeyName", parent: name, pattern: "[a-zA-Z0-9_-]+")
            try self.tokenSigningPublicKeys?.forEach {
                try validate($0.key, name: "tokenSigningPublicKeys.key", parent: name, max: 128)
                try validate($0.key, name: "tokenSigningPublicKeys.key", parent: name, min: 1)
                try validate($0.key, name: "tokenSigningPublicKeys.key", parent: name, pattern: "[a-zA-Z0-9:_-]+")
                try validate($0.value, name: "tokenSigningPublicKeys[\"\($0.key)\"]", parent: name, max: 5120)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case authorizerFunctionArn
            case signingDisabled
            case status
            case tags
            case tokenKeyName
            case tokenSigningPublicKeys
        }
    }

    public struct CreateAuthorizerResponse: AWSDecodableShape {
        /// The authorizer ARN.
        public let authorizerArn: String?
        /// The authorizer's name.
        public let authorizerName: String?

        public init(authorizerArn: String? = nil, authorizerName: String? = nil) {
            self.authorizerArn = authorizerArn
            self.authorizerName = authorizerName
        }

        private enum CodingKeys: String, CodingKey {
            case authorizerArn
            case authorizerName
        }
    }

    public struct CreateBillingGroupRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "billingGroupName", location: .uri(locationName: "billingGroupName"))
        ]

        /// The name you wish to give to the billing group.
        public let billingGroupName: String
        /// The properties of the billing group.
        public let billingGroupProperties: BillingGroupProperties?
        /// Metadata which can be used to manage the billing group.
        public let tags: [Tag]?

        public init(billingGroupName: String, billingGroupProperties: BillingGroupProperties? = nil, tags: [Tag]? = nil) {
            self.billingGroupName = billingGroupName
            self.billingGroupProperties = billingGroupProperties
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, max: 128)
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, min: 1)
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
            try self.billingGroupProperties?.validate(name: "\(name).billingGroupProperties")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case billingGroupProperties
            case tags
        }
    }

    public struct CreateBillingGroupResponse: AWSDecodableShape {
        /// The ARN of the billing group.
        public let billingGroupArn: String?
        /// The ID of the billing group.
        public let billingGroupId: String?
        /// The name you gave to the billing group.
        public let billingGroupName: String?

        public init(billingGroupArn: String? = nil, billingGroupId: String? = nil, billingGroupName: String? = nil) {
            self.billingGroupArn = billingGroupArn
            self.billingGroupId = billingGroupId
            self.billingGroupName = billingGroupName
        }

        private enum CodingKeys: String, CodingKey {
            case billingGroupArn
            case billingGroupId
            case billingGroupName
        }
    }

    public struct CreateCertificateFromCsrRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "setAsActive", location: .querystring(locationName: "setAsActive"))
        ]

        /// The certificate signing request (CSR).
        public let certificateSigningRequest: String
        /// Specifies whether the certificate is active.
        public let setAsActive: Bool?

        public init(certificateSigningRequest: String, setAsActive: Bool? = nil) {
            self.certificateSigningRequest = certificateSigningRequest
            self.setAsActive = setAsActive
        }

        public func validate(name: String) throws {
            try self.validate(self.certificateSigningRequest, name: "certificateSigningRequest", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case certificateSigningRequest
        }
    }

    public struct CreateCertificateFromCsrResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the certificate. You can use the ARN as a principal for policy operations.
        public let certificateArn: String?
        /// The ID of the certificate. Certificate management operations only take a certificateId.
        public let certificateId: String?
        /// The certificate data, in PEM format.
        public let certificatePem: String?

        public init(certificateArn: String? = nil, certificateId: String? = nil, certificatePem: String? = nil) {
            self.certificateArn = certificateArn
            self.certificateId = certificateId
            self.certificatePem = certificatePem
        }

        private enum CodingKeys: String, CodingKey {
            case certificateArn
            case certificateId
            case certificatePem
        }
    }

    public struct CreateCustomMetricRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "metricName", location: .uri(locationName: "metricName"))
        ]

        /// Each custom metric must have a unique client request token. If you try to create a new custom metric that already exists with a different token, an exception occurs. If you omit this value, AWS SDKs will automatically generate a unique client request.
        public let clientRequestToken: String
        ///  Field represents a friendly name in the console for the custom metric; it doesn't have to be unique. Don't use this name as the metric identifier in the device metric report. Can be updated once defined.
        public let displayName: String?
        ///  The name of the custom metric. This will be used in the metric report submitted from the device/thing. Shouldn't begin with aws:. Cannot be updated once defined.
        public let metricName: String
        ///  The type of the custom metric. Types include string-list, ip-address-list, number-list, and number.
        public let metricType: CustomMetricType
        ///  Metadata that can be used to manage the custom metric.
        public let tags: [Tag]?

        public init(clientRequestToken: String = CreateCustomMetricRequest.idempotencyToken(), displayName: String? = nil, metricName: String, metricType: CustomMetricType, tags: [Tag]? = nil) {
            self.clientRequestToken = clientRequestToken
            self.displayName = displayName
            self.metricName = metricName
            self.metricType = metricType
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 64)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[a-zA-Z0-9-_]+$")
            try self.validate(self.displayName, name: "displayName", parent: name, max: 128)
            try self.validate(self.displayName, name: "displayName", parent: name, pattern: "[\\p{Graph}\\x20]*")
            try self.validate(self.metricName, name: "metricName", parent: name, max: 128)
            try self.validate(self.metricName, name: "metricName", parent: name, min: 1)
            try self.validate(self.metricName, name: "metricName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken
            case displayName
            case metricType
            case tags
        }
    }

    public struct CreateCustomMetricResponse: AWSDecodableShape {
        ///  The Amazon Resource Number (ARN) of the custom metric, e.g. arn:aws-partition:iot:region:accountId:custommetric/metricName
        public let metricArn: String?
        ///  The name of the custom metric to be used in the metric report.
        public let metricName: String?

        public init(metricArn: String? = nil, metricName: String? = nil) {
            self.metricArn = metricArn
            self.metricName = metricName
        }

        private enum CodingKeys: String, CodingKey {
            case metricArn
            case metricName
        }
    }

    public struct CreateDimensionRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "name", location: .uri(locationName: "name"))
        ]

        /// Each dimension must have a unique client request token. If you try to create a new dimension with the same token as a dimension that already exists, an exception occurs. If you omit this value, AWS SDKs will automatically generate a unique client request.
        public let clientRequestToken: String
        /// A unique identifier for the dimension. Choose something that describes the type and value to make it easy to remember what it does.
        public let name: String
        /// Specifies the value or list of values for the dimension. For TOPIC_FILTER dimensions, this is a pattern used to match the MQTT topic (for example, "admin/#").
        public let stringValues: [String]
        /// Metadata that can be used to manage the dimension.
        public let tags: [Tag]?
        /// Specifies the type of dimension. Supported types: TOPIC_FILTER.
        public let type: DimensionType

        public init(clientRequestToken: String = CreateDimensionRequest.idempotencyToken(), name: String, stringValues: [String], tags: [Tag]? = nil, type: DimensionType) {
            self.clientRequestToken = clientRequestToken
            self.name = name
            self.stringValues = stringValues
            self.tags = tags
            self.type = type
        }

        public func validate(name: String) throws {
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 64)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[a-zA-Z0-9-_]+$")
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "[a-zA-Z0-9:_-]+")
            try self.stringValues.forEach {
                try validate($0, name: "stringValues[]", parent: name, max: 256)
                try validate($0, name: "stringValues[]", parent: name, min: 1)
            }
            try self.validate(self.stringValues, name: "stringValues", parent: name, max: 100)
            try self.validate(self.stringValues, name: "stringValues", parent: name, min: 1)
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case clientRequestToken
            case stringValues
            case tags
            case type
        }
    }

    public struct CreateDimensionResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the created dimension.
        public let arn: String?
        /// A unique identifier for the dimension.
        public let name: String?

        public init(arn: String? = nil, name: String? = nil) {
            self.arn = arn
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case arn
            case name
        }
    }

    public struct CreateDomainConfigurationRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainConfigurationName", location: .uri(locationName: "domainConfigurationName"))
        ]

        /// An object that specifies the authorization service for a domain.
        public let authorizerConfig: AuthorizerConfig?
        /// The name of the domain configuration. This value must be unique to a region.
        public let domainConfigurationName: String
        /// The name of the domain.
        public let domainName: String?
        /// The ARNs of the certificates that AWS IoT passes to the device during the TLS handshake. Currently you can specify only one certificate ARN. This value is not required for AWS-managed domains.
        public let serverCertificateArns: [String]?
        /// The type of service delivered by the endpoint.  AWS IoT Core currently supports only the DATA service type.
        public let serviceType: ServiceType?
        /// Metadata which can be used to manage the domain configuration.  For URI Request parameters use format: ...key1=value1&amp;key2=value2... For the CLI command-line parameter use format: &amp;&amp;tags "key1=value1&amp;key2=value2..." For the cli-input-json file use format: "tags": "key1=value1&amp;key2=value2..."
        public let tags: [Tag]?
        /// The certificate used to validate the server certificate and prove domain name ownership. This certificate must be signed by a public certificate authority. This value is not required for AWS-managed domains.
        public let validationCertificateArn: String?

        public init(authorizerConfig: AuthorizerConfig? = nil, domainConfigurationName: String, domainName: String? = nil, serverCertificateArns: [String]? = nil, serviceType: ServiceType? = nil, tags: [Tag]? = nil, validationCertificateArn: String? = nil) {
            self.authorizerConfig = authorizerConfig
            self.domainConfigurationName = domainConfigurationName
            self.domainName = domainName
            self.serverCertificateArns = serverCertificateArns
            self.serviceType = serviceType
            self.tags = tags
            self.validationCertificateArn = validationCertificateArn
        }

        public func validate(name: String) throws {
            try self.authorizerConfig?.validate(name: "\(name).authorizerConfig")
            try self.validate(self.domainConfigurationName, name: "domainConfigurationName", parent: name, max: 128)
            try self.validate(self.domainConfigurationName, name: "domainConfigurationName", parent: name, min: 1)
            try self.validate(self.domainConfigurationName, name: "domainConfigurationName", parent: name, pattern: "[\\w.-]+")
            try self.validate(self.domainName, name: "domainName", parent: name, max: 253)
            try self.validate(self.domainName, name: "domainName", parent: name, min: 1)
            try self.serverCertificateArns?.forEach {
                try validate($0, name: "serverCertificateArns[]", parent: name, max: 2048)
                try validate($0, name: "serverCertificateArns[]", parent: name, min: 1)
                try validate($0, name: "serverCertificateArns[]", parent: name, pattern: "arn:aws(-cn|-us-gov|-iso-b|-iso)?:acm:[a-z]{2}-(gov-|iso-|isob-)?[a-z]{4,9}-\\d{1}:\\d{12}:certificate/[a-zA-Z0-9/-]+")
            }
            try self.validate(self.serverCertificateArns, name: "serverCertificateArns", parent: name, max: 1)
            try self.validate(self.serverCertificateArns, name: "serverCertificateArns", parent: name, min: 0)
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.validationCertificateArn, name: "validationCertificateArn", parent: name, max: 2048)
            try self.validate(self.validationCertificateArn, name: "validationCertificateArn", parent: name, min: 1)
            try self.validate(self.validationCertificateArn, name: "validationCertificateArn", parent: name, pattern: "arn:aws(-cn|-us-gov|-iso-b|-iso)?:acm:[a-z]{2}-(gov-|iso-|isob-)?[a-z]{4,9}-\\d{1}:\\d{12}:certificate/[a-zA-Z0-9/-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case authorizerConfig
            case domainName
            case serverCertificateArns
            case serviceType
            case tags
            case validationCertificateArn
        }
    }

    public struct CreateDomainConfigurationResponse: AWSDecodableShape {
        /// The ARN of the domain configuration.
        public let domainConfigurationArn: String?
        /// The name of the domain configuration.
        public let domainConfigurationName: String?

        public init(domainConfigurationArn: String? = nil, domainConfigurationName: String? = nil) {
            self.domainConfigurationArn = domainConfigurationArn
            self.domainConfigurationName = domainConfigurationName
        }

        private enum CodingKeys: String, CodingKey {
            case domainConfigurationArn
            case domainConfigurationName
        }
    }

    public struct CreateDynamicThingGroupRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "thingGroupName", location: .uri(locationName: "thingGroupName"))
        ]

        /// The dynamic thing group index name.  Currently one index is supported: "AWS_Things".
        public let indexName: String?
        /// The dynamic thing group search query string. See Query Syntax for information about query string syntax.
        public let queryString: String
        /// The dynamic thing group query version.  Currently one query version is supported: "2017-09-30". If not specified, the query version defaults to this value.
        public let queryVersion: String?
        /// Metadata which can be used to manage the dynamic thing group.
        public let tags: [Tag]?
        /// The dynamic thing group name to create.
        public let thingGroupName: String
        /// The dynamic thing group properties.
        public let thingGroupProperties: ThingGroupProperties?

        public init(indexName: String? = nil, queryString: String, queryVersion: String? = nil, tags: [Tag]? = nil, thingGroupName: String, thingGroupProperties: ThingGroupProperties? = nil) {
            self.indexName = indexName
            self.queryString = queryString
            self.queryVersion = queryVersion
            self.tags = tags
            self.thingGroupName = thingGroupName
            self.thingGroupProperties = thingGroupProperties
        }

        public func validate(name: String) throws {
            try self.validate(self.indexName, name: "indexName", parent: name, max: 128)
            try self.validate(self.indexName, name: "indexName", parent: name, min: 1)
            try self.validate(self.indexName, name: "indexName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
            try self.validate(self.queryString, name: "queryString", parent: name, min: 1)
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, max: 128)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, min: 1)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
            try self.thingGroupProperties?.validate(name: "\(name).thingGroupProperties")
        }

        private enum CodingKeys: String, CodingKey {
            case indexName
            case queryString
            case queryVersion
            case tags
            case thingGroupProperties
        }
    }

    public struct CreateDynamicThingGroupResponse: AWSDecodableShape {
        /// The dynamic thing group index name.
        public let indexName: String?
        /// The dynamic thing group search query string.
        public let queryString: String?
        /// The dynamic thing group query version.
        public let queryVersion: String?
        /// The dynamic thing group ARN.
        public let thingGroupArn: String?
        /// The dynamic thing group ID.
        public let thingGroupId: String?
        /// The dynamic thing group name.
        public let thingGroupName: String?

        public init(indexName: String? = nil, queryString: String? = nil, queryVersion: String? = nil, thingGroupArn: String? = nil, thingGroupId: String? = nil, thingGroupName: String? = nil) {
            self.indexName = indexName
            self.queryString = queryString
            self.queryVersion = queryVersion
            self.thingGroupArn = thingGroupArn
            self.thingGroupId = thingGroupId
            self.thingGroupName = thingGroupName
        }

        private enum CodingKeys: String, CodingKey {
            case indexName
            case queryString
            case queryVersion
            case thingGroupArn
            case thingGroupId
            case thingGroupName
        }
    }

    public struct CreateJobRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "jobId", location: .uri(locationName: "jobId"))
        ]

        /// Allows you to create criteria to abort a job.
        public let abortConfig: AbortConfig?
        /// A short text description of the job.
        public let description: String?
        /// The job document.  If the job document resides in an S3 bucket, you must use a placeholder link when specifying the document. The placeholder link is of the following form:  ${aws:iot:s3-presigned-url:https://s3.amazonaws.com/bucket/key}  where bucket is your bucket name and key is the object in the bucket to which you are linking.
        public let document: String?
        /// An S3 link to the job document.
        public let documentSource: String?
        /// Allows you to create a staged rollout of the job.
        public let jobExecutionsRolloutConfig: JobExecutionsRolloutConfig?
        /// A job identifier which must be unique for your AWS account. We recommend using a UUID. Alpha-numeric characters, "-" and "_" are valid for use here.
        public let jobId: String
        /// The namespace used to indicate that a job is a customer-managed job. When you specify a value for this parameter, AWS IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.  $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/   The namespaceId feature is in public preview.
        public let namespaceId: String?
        /// Configuration information for pre-signed S3 URLs.
        public let presignedUrlConfig: PresignedUrlConfig?
        /// Metadata which can be used to manage the job.
        public let tags: [Tag]?
        /// A list of things and thing groups to which the job should be sent.
        public let targets: [String]
        /// Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing when a change is detected in a target. For example, a job will run on a thing when the thing is added to a target group, even after the job was completed by all things originally in the group.
        public let targetSelection: TargetSelection?
        /// Specifies the amount of time each device has to finish its execution of the job. The timer is started when the job execution status is set to IN_PROGRESS. If the job execution status is not set to another terminal state before the time expires, it will be automatically set to TIMED_OUT.
        public let timeoutConfig: TimeoutConfig?

        public init(abortConfig: AbortConfig? = nil, description: String? = nil, document: String? = nil, documentSource: String? = nil, jobExecutionsRolloutConfig: JobExecutionsRolloutConfig? = nil, jobId: String, namespaceId: String? = nil, presignedUrlConfig: PresignedUrlConfig? = nil, tags: [Tag]? = nil, targets: [String], targetSelection: TargetSelection? = nil, timeoutConfig: TimeoutConfig? = nil) {
            self.abortConfig = abortConfig
            self.description = description
            self.document = document
            self.documentSource = documentSource
            self.jobExecutionsRolloutConfig = jobExecutionsRolloutConfig
            self.jobId = jobId
            self.namespaceId = namespaceId
            self.presignedUrlConfig = presignedUrlConfig
            self.tags = tags
            self.targets = targets
            self.targetSelection = targetSelection
            self.timeoutConfig = timeoutConfig
        }

        public func validate(name: String) throws {
            try self.abortConfig?.validate(name: "\(name).abortConfig")
            try self.validate(self.description, name: "description", parent: name, max: 2028)
            try self.validate(self.description, name: "description", parent: name, pattern: "[^\\p{C}]+")
            try self.validate(self.document, name: "document", parent: name, max: 32768)
            try self.validate(self.documentSource, name: "documentSource", parent: name, max: 1350)
            try self.validate(self.documentSource, name: "documentSource", parent: name, min: 1)
            try self.jobExecutionsRolloutConfig?.validate(name: "\(name).jobExecutionsRolloutConfig")
            try self.validate(self.jobId, name: "jobId", parent: name, max: 64)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "[a-zA-Z0-9_-]+")
            try self.validate(self.namespaceId, name: "namespaceId", parent: name, max: 64)
            try self.validate(self.namespaceId, name: "namespaceId", parent: name, min: 1)
            try self.validate(self.namespaceId, name: "namespaceId", parent: name, pattern: "[a-zA-Z0-9_-]+")
            try self.presignedUrlConfig?.validate(name: "\(name).presignedUrlConfig")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.targets.forEach {
                try validate($0, name: "targets[]", parent: name, max: 2048)
            }
            try self.validate(self.targets, name: "targets", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case abortConfig
            case description
            case document
            case documentSource
            case jobExecutionsRolloutConfig
            case namespaceId
            case presignedUrlConfig
            case tags
            case targets
            case targetSelection
            case timeoutConfig
        }
    }

    public struct CreateJobResponse: AWSDecodableShape {
        /// The job description.
        public let description: String?
        /// The job ARN.
        public let jobArn: String?
        /// The unique identifier you assigned to this job.
        public let jobId: String?

        public init(description: String? = nil, jobArn: String? = nil, jobId: String? = nil) {
            self.description = description
            self.jobArn = jobArn
            self.jobId = jobId
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case jobArn
            case jobId
        }
    }

    public struct CreateKeysAndCertificateRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "setAsActive", location: .querystring(locationName: "setAsActive"))
        ]

        /// Specifies whether the certificate is active.
        public let setAsActive: Bool?

        public init(setAsActive: Bool? = nil) {
            self.setAsActive = setAsActive
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct CreateKeysAndCertificateResponse: AWSDecodableShape {
        /// The ARN of the certificate.
        public let certificateArn: String?
        /// The ID of the certificate. AWS IoT issues a default subject name for the certificate (for example, AWS IoT Certificate).
        public let certificateId: String?
        /// The certificate data, in PEM format.
        public let certificatePem: String?
        /// The generated key pair.
        public let keyPair: KeyPair?

        public init(certificateArn: String? = nil, certificateId: String? = nil, certificatePem: String? = nil, keyPair: KeyPair? = nil) {
            self.certificateArn = certificateArn
            self.certificateId = certificateId
            self.certificatePem = certificatePem
            self.keyPair = keyPair
        }

        private enum CodingKeys: String, CodingKey {
            case certificateArn
            case certificateId
            case certificatePem
            case keyPair
        }
    }

    public struct CreateMitigationActionRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "actionName", location: .uri(locationName: "actionName"))
        ]

        /// A friendly name for the action. Choose a friendly name that accurately describes the action (for example, EnableLoggingAction).
        public let actionName: String
        /// Defines the type of action and the parameters for that action.
        public let actionParams: MitigationActionParams
        /// The ARN of the IAM role that is used to apply the mitigation action.
        public let roleArn: String
        /// Metadata that can be used to manage the mitigation action.
        public let tags: [Tag]?

        public init(actionName: String, actionParams: MitigationActionParams, roleArn: String, tags: [Tag]? = nil) {
            self.actionName = actionName
            self.actionParams = actionParams
            self.roleArn = roleArn
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.actionName, name: "actionName", parent: name, max: 128)
            try self.validate(self.actionName, name: "actionName", parent: name, pattern: "[a-zA-Z0-9_-]+")
            try self.actionParams.validate(name: "\(name).actionParams")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 20)
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case actionParams
            case roleArn
            case tags
        }
    }

    public struct CreateMitigationActionResponse: AWSDecodableShape {
        /// The ARN for the new mitigation action.
        public let actionArn: String?
        /// A unique identifier for the new mitigation action.
        public let actionId: String?

        public init(actionArn: String? = nil, actionId: String? = nil) {
            self.actionArn = actionArn
            self.actionId = actionId
        }

        private enum CodingKeys: String, CodingKey {
            case actionArn
            case actionId
        }
    }

    public struct CreateOTAUpdateRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "otaUpdateId", location: .uri(locationName: "otaUpdateId"))
        ]

        /// A list of additional OTA update parameters which are name-value pairs.
        public let additionalParameters: [String: String]?
        /// The criteria that determine when and how a job abort takes place.
        public let awsJobAbortConfig: AwsJobAbortConfig?
        /// Configuration for the rollout of OTA updates.
        public let awsJobExecutionsRolloutConfig: AwsJobExecutionsRolloutConfig?
        /// Configuration information for pre-signed URLs.
        public let awsJobPresignedUrlConfig: AwsJobPresignedUrlConfig?
        /// Specifies the amount of time each device has to finish its execution of the job. A timer is started when the job execution status is set to IN_PROGRESS. If the job execution status is not set to another terminal state before the timer expires, it will be automatically set to TIMED_OUT.
        public let awsJobTimeoutConfig: AwsJobTimeoutConfig?
        /// The description of the OTA update.
        public let description: String?
        /// The files to be streamed by the OTA update.
        public let files: [OTAUpdateFile]
        /// The ID of the OTA update to be created.
        public let otaUpdateId: String
        /// The protocol used to transfer the OTA update image. Valid values are [HTTP], [MQTT], [HTTP, MQTT]. When both HTTP and MQTT are specified, the target device can choose the protocol.
        public let protocols: [Protocol]?
        /// The IAM role that grants AWS IoT access to the Amazon S3, AWS IoT jobs and AWS Code Signing resources to create an OTA update job.
        public let roleArn: String
        /// Metadata which can be used to manage updates.
        public let tags: [Tag]?
        /// The devices targeted to receive OTA updates.
        public let targets: [String]
        /// Specifies whether the update will continue to run (CONTINUOUS), or will be complete after all the things specified as targets have completed the update (SNAPSHOT). If continuous, the update may also be run on a thing when a change is detected in a target. For example, an update will run on a thing when the thing is added to a target group, even after the update was completed by all things originally in the group. Valid values: CONTINUOUS | SNAPSHOT.
        public let targetSelection: TargetSelection?

        public init(additionalParameters: [String: String]? = nil, awsJobAbortConfig: AwsJobAbortConfig? = nil, awsJobExecutionsRolloutConfig: AwsJobExecutionsRolloutConfig? = nil, awsJobPresignedUrlConfig: AwsJobPresignedUrlConfig? = nil, awsJobTimeoutConfig: AwsJobTimeoutConfig? = nil, description: String? = nil, files: [OTAUpdateFile], otaUpdateId: String, protocols: [Protocol]? = nil, roleArn: String, tags: [Tag]? = nil, targets: [String], targetSelection: TargetSelection? = nil) {
            self.additionalParameters = additionalParameters
            self.awsJobAbortConfig = awsJobAbortConfig
            self.awsJobExecutionsRolloutConfig = awsJobExecutionsRolloutConfig
            self.awsJobPresignedUrlConfig = awsJobPresignedUrlConfig
            self.awsJobTimeoutConfig = awsJobTimeoutConfig
            self.description = description
            self.files = files
            self.otaUpdateId = otaUpdateId
            self.protocols = protocols
            self.roleArn = roleArn
            self.tags = tags
            self.targets = targets
            self.targetSelection = targetSelection
        }

        public func validate(name: String) throws {
            try self.awsJobAbortConfig?.validate(name: "\(name).awsJobAbortConfig")
            try self.awsJobExecutionsRolloutConfig?.validate(name: "\(name).awsJobExecutionsRolloutConfig")
            try self.validate(self.description, name: "description", parent: name, max: 2028)
            try self.validate(self.description, name: "description", parent: name, pattern: "[^\\p{C}]+")
            try self.files.forEach {
                try $0.validate(name: "\(name).files[]")
            }
            try self.validate(self.files, name: "files", parent: name, max: 50)
            try self.validate(self.files, name: "files", parent: name, min: 1)
            try self.validate(self.otaUpdateId, name: "otaUpdateId", parent: name, max: 128)
            try self.validate(self.otaUpdateId, name: "otaUpdateId", parent: name, min: 1)
            try self.validate(self.otaUpdateId, name: "otaUpdateId", parent: name, pattern: "[a-zA-Z0-9_-]+")
            try self.validate(self.protocols, name: "protocols", parent: name, max: 2)
            try self.validate(self.protocols, name: "protocols", parent: name, min: 1)
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 20)
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.targets, name: "targets", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case additionalParameters
            case awsJobAbortConfig
            case awsJobExecutionsRolloutConfig
            case awsJobPresignedUrlConfig
            case awsJobTimeoutConfig
            case description
            case files
            case protocols
            case roleArn
            case tags
            case targets
            case targetSelection
        }
    }

    public struct CreateOTAUpdateResponse: AWSDecodableShape {
        /// The AWS IoT job ARN associated with the OTA update.
        public let awsIotJobArn: String?
        /// The AWS IoT job ID associated with the OTA update.
        public let awsIotJobId: String?
        /// The OTA update ARN.
        public let otaUpdateArn: String?
        /// The OTA update ID.
        public let otaUpdateId: String?
        /// The OTA update status.
        public let otaUpdateStatus: OTAUpdateStatus?

        public init(awsIotJobArn: String? = nil, awsIotJobId: String? = nil, otaUpdateArn: String? = nil, otaUpdateId: String? = nil, otaUpdateStatus: OTAUpdateStatus? = nil) {
            self.awsIotJobArn = awsIotJobArn
            self.awsIotJobId = awsIotJobId
            self.otaUpdateArn = otaUpdateArn
            self.otaUpdateId = otaUpdateId
            self.otaUpdateStatus = otaUpdateStatus
        }

        private enum CodingKeys: String, CodingKey {
            case awsIotJobArn
            case awsIotJobId
            case otaUpdateArn
            case otaUpdateId
            case otaUpdateStatus
        }
    }

    public struct CreatePolicyRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "policyName", location: .uri(locationName: "policyName"))
        ]

        /// The JSON document that describes the policy. policyDocument must have a minimum length of 1, with a maximum length of 2048, excluding whitespace.
        public let policyDocument: String
        /// The policy name.
        public let policyName: String
        /// Metadata which can be used to manage the policy.  For URI Request parameters use format: ...key1=value1&amp;key2=value2... For the CLI command-line parameter use format: &amp;&amp;tags "key1=value1&amp;key2=value2..." For the cli-input-json file use format: "tags": "key1=value1&amp;key2=value2..."
        public let tags: [Tag]?

        public init(policyDocument: String, policyName: String, tags: [Tag]? = nil) {
            self.policyDocument = policyDocument
            self.policyName = policyName
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.policyName, name: "policyName", parent: name, max: 128)
            try self.validate(self.policyName, name: "policyName", parent: name, min: 1)
            try self.validate(self.policyName, name: "policyName", parent: name, pattern: "[\\w+=,.@-]+")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case policyDocument
            case tags
        }
    }

    public struct CreatePolicyResponse: AWSDecodableShape {
        /// The policy ARN.
        public let policyArn: String?
        /// The JSON document that describes the policy.
        public let policyDocument: String?
        /// The policy name.
        public let policyName: String?
        /// The policy version ID.
        public let policyVersionId: String?

        public init(policyArn: String? = nil, policyDocument: String? = nil, policyName: String? = nil, policyVersionId: String? = nil) {
            self.policyArn = policyArn
            self.policyDocument = policyDocument
            self.policyName = policyName
            self.policyVersionId = policyVersionId
        }

        private enum CodingKeys: String, CodingKey {
            case policyArn
            case policyDocument
            case policyName
            case policyVersionId
        }
    }

    public struct CreatePolicyVersionRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "policyName", location: .uri(locationName: "policyName")),
            AWSMemberEncoding(label: "setAsDefault", location: .querystring(locationName: "setAsDefault"))
        ]

        /// The JSON document that describes the policy. Minimum length of 1. Maximum length of 2048, excluding whitespace.
        public let policyDocument: String
        /// The policy name.
        public let policyName: String
        /// Specifies whether the policy version is set as the default. When this parameter is true, the new policy version becomes the operative version (that is, the version that is in effect for the certificates to which the policy is attached).
        public let setAsDefault: Bool?

        public init(policyDocument: String, policyName: String, setAsDefault: Bool? = nil) {
            self.policyDocument = policyDocument
            self.policyName = policyName
            self.setAsDefault = setAsDefault
        }

        public func validate(name: String) throws {
            try self.validate(self.policyName, name: "policyName", parent: name, max: 128)
            try self.validate(self.policyName, name: "policyName", parent: name, min: 1)
            try self.validate(self.policyName, name: "policyName", parent: name, pattern: "[\\w+=,.@-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case policyDocument
        }
    }

    public struct CreatePolicyVersionResponse: AWSDecodableShape {
        /// Specifies whether the policy version is the default.
        public let isDefaultVersion: Bool?
        /// The policy ARN.
        public let policyArn: String?
        /// The JSON document that describes the policy.
        public let policyDocument: String?
        /// The policy version ID.
        public let policyVersionId: String?

        public init(isDefaultVersion: Bool? = nil, policyArn: String? = nil, policyDocument: String? = nil, policyVersionId: String? = nil) {
            self.isDefaultVersion = isDefaultVersion
            self.policyArn = policyArn
            self.policyDocument = policyDocument
            self.policyVersionId = policyVersionId
        }

        private enum CodingKeys: String, CodingKey {
            case isDefaultVersion
            case policyArn
            case policyDocument
            case policyVersionId
        }
    }

    public struct CreateProvisioningClaimRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "templateName", location: .uri(locationName: "templateName"))
        ]

        /// The name of the provisioning template to use.
        public let templateName: String

        public init(templateName: String) {
            self.templateName = templateName
        }

        public func validate(name: String) throws {
            try self.validate(self.templateName, name: "templateName", parent: name, max: 36)
            try self.validate(self.templateName, name: "templateName", parent: name, min: 1)
            try self.validate(self.templateName, name: "templateName", parent: name, pattern: "^[0-9A-Za-z_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct CreateProvisioningClaimResponse: AWSDecodableShape {
        /// The ID of the certificate.
        public let certificateId: String?
        /// The provisioning claim certificate.
        public let certificatePem: String?
        /// The provisioning claim expiration time.
        public let expiration: Date?
        /// The provisioning claim key pair.
        public let keyPair: KeyPair?

        public init(certificateId: String? = nil, certificatePem: String? = nil, expiration: Date? = nil, keyPair: KeyPair? = nil) {
            self.certificateId = certificateId
            self.certificatePem = certificatePem
            self.expiration = expiration
            self.keyPair = keyPair
        }

        private enum CodingKeys: String, CodingKey {
            case certificateId
            case certificatePem
            case expiration
            case keyPair
        }
    }

    public struct CreateProvisioningTemplateRequest: AWSEncodableShape {
        /// The description of the fleet provisioning template.
        public let description: String?
        /// True to enable the fleet provisioning template, otherwise false.
        public let enabled: Bool?
        /// Creates a pre-provisioning hook template.
        public let preProvisioningHook: ProvisioningHook?
        /// The role ARN for the role associated with the fleet provisioning template. This IoT role grants permission to provision a device.
        public let provisioningRoleArn: String
        /// Metadata which can be used to manage the fleet provisioning template.  For URI Request parameters use format: ...key1=value1&amp;key2=value2... For the CLI command-line parameter use format: &amp;&amp;tags "key1=value1&amp;key2=value2..." For the cli-input-json file use format: "tags": "key1=value1&amp;key2=value2..."
        public let tags: [Tag]?
        /// The JSON formatted contents of the fleet provisioning template.
        public let templateBody: String
        /// The name of the fleet provisioning template.
        public let templateName: String

        public init(description: String? = nil, enabled: Bool? = nil, preProvisioningHook: ProvisioningHook? = nil, provisioningRoleArn: String, tags: [Tag]? = nil, templateBody: String, templateName: String) {
            self.description = description
            self.enabled = enabled
            self.preProvisioningHook = preProvisioningHook
            self.provisioningRoleArn = provisioningRoleArn
            self.tags = tags
            self.templateBody = templateBody
            self.templateName = templateName
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 500)
            try self.validate(self.description, name: "description", parent: name, min: 0)
            try self.validate(self.description, name: "description", parent: name, pattern: "[^\\p{C}]*")
            try self.preProvisioningHook?.validate(name: "\(name).preProvisioningHook")
            try self.validate(self.provisioningRoleArn, name: "provisioningRoleArn", parent: name, max: 2048)
            try self.validate(self.provisioningRoleArn, name: "provisioningRoleArn", parent: name, min: 20)
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.templateName, name: "templateName", parent: name, max: 36)
            try self.validate(self.templateName, name: "templateName", parent: name, min: 1)
            try self.validate(self.templateName, name: "templateName", parent: name, pattern: "^[0-9A-Za-z_-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case enabled
            case preProvisioningHook
            case provisioningRoleArn
            case tags
            case templateBody
            case templateName
        }
    }

    public struct CreateProvisioningTemplateResponse: AWSDecodableShape {
        /// The default version of the fleet provisioning template.
        public let defaultVersionId: Int?
        /// The ARN that identifies the provisioning template.
        public let templateArn: String?
        /// The name of the fleet provisioning template.
        public let templateName: String?

        public init(defaultVersionId: Int? = nil, templateArn: String? = nil, templateName: String? = nil) {
            self.defaultVersionId = defaultVersionId
            self.templateArn = templateArn
            self.templateName = templateName
        }

        private enum CodingKeys: String, CodingKey {
            case defaultVersionId
            case templateArn
            case templateName
        }
    }

    public struct CreateProvisioningTemplateVersionRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "setAsDefault", location: .querystring(locationName: "setAsDefault")),
            AWSMemberEncoding(label: "templateName", location: .uri(locationName: "templateName"))
        ]

        /// Sets a fleet provision template version as the default version.
        public let setAsDefault: Bool?
        /// The JSON formatted contents of the fleet provisioning template.
        public let templateBody: String
        /// The name of the fleet provisioning template.
        public let templateName: String

        public init(setAsDefault: Bool? = nil, templateBody: String, templateName: String) {
            self.setAsDefault = setAsDefault
            self.templateBody = templateBody
            self.templateName = templateName
        }

        public func validate(name: String) throws {
            try self.validate(self.templateName, name: "templateName", parent: name, max: 36)
            try self.validate(self.templateName, name: "templateName", parent: name, min: 1)
            try self.validate(self.templateName, name: "templateName", parent: name, pattern: "^[0-9A-Za-z_-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case templateBody
        }
    }

    public struct CreateProvisioningTemplateVersionResponse: AWSDecodableShape {
        /// True if the fleet provisioning template version is the default version, otherwise false.
        public let isDefaultVersion: Bool?
        /// The ARN that identifies the provisioning template.
        public let templateArn: String?
        /// The name of the fleet provisioning template.
        public let templateName: String?
        /// The version of the fleet provisioning template.
        public let versionId: Int?

        public init(isDefaultVersion: Bool? = nil, templateArn: String? = nil, templateName: String? = nil, versionId: Int? = nil) {
            self.isDefaultVersion = isDefaultVersion
            self.templateArn = templateArn
            self.templateName = templateName
            self.versionId = versionId
        }

        private enum CodingKeys: String, CodingKey {
            case isDefaultVersion
            case templateArn
            case templateName
            case versionId
        }
    }

    public struct CreateRoleAliasRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "roleAlias", location: .uri(locationName: "roleAlias"))
        ]

        /// How long (in seconds) the credentials will be valid.
        public let credentialDurationSeconds: Int?
        /// The role alias that points to a role ARN. This allows you to change the role without having to update the device.
        public let roleAlias: String
        /// The role ARN.
        public let roleArn: String
        /// Metadata which can be used to manage the role alias.  For URI Request parameters use format: ...key1=value1&amp;key2=value2... For the CLI command-line parameter use format: &amp;&amp;tags "key1=value1&amp;key2=value2..." For the cli-input-json file use format: "tags": "key1=value1&amp;key2=value2..."
        public let tags: [Tag]?

        public init(credentialDurationSeconds: Int? = nil, roleAlias: String, roleArn: String, tags: [Tag]? = nil) {
            self.credentialDurationSeconds = credentialDurationSeconds
            self.roleAlias = roleAlias
            self.roleArn = roleArn
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.credentialDurationSeconds, name: "credentialDurationSeconds", parent: name, max: 3600)
            try self.validate(self.credentialDurationSeconds, name: "credentialDurationSeconds", parent: name, min: 900)
            try self.validate(self.roleAlias, name: "roleAlias", parent: name, max: 128)
            try self.validate(self.roleAlias, name: "roleAlias", parent: name, min: 1)
            try self.validate(self.roleAlias, name: "roleAlias", parent: name, pattern: "[\\w=,@-]+")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 20)
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case credentialDurationSeconds
            case roleArn
            case tags
        }
    }

    public struct CreateRoleAliasResponse: AWSDecodableShape {
        /// The role alias.
        public let roleAlias: String?
        /// The role alias ARN.
        public let roleAliasArn: String?

        public init(roleAlias: String? = nil, roleAliasArn: String? = nil) {
            self.roleAlias = roleAlias
            self.roleAliasArn = roleAliasArn
        }

        private enum CodingKeys: String, CodingKey {
            case roleAlias
            case roleAliasArn
        }
    }

    public struct CreateScheduledAuditRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "scheduledAuditName", location: .uri(locationName: "scheduledAuditName"))
        ]

        /// The day of the month on which the scheduled audit takes place. This can be "1" through "31" or "LAST". This field is required if the "frequency" parameter is set to MONTHLY. If days 29 to 31 are specified, and the month doesn't have that many days, the audit takes place on the LAST day of the month.
        public let dayOfMonth: String?
        /// The day of the week on which the scheduled audit takes place, either SUN, MON, TUE, WED, THU, FRI, or SAT. This field is required if the frequency parameter is set to WEEKLY or BIWEEKLY.
        public let dayOfWeek: DayOfWeek?
        /// How often the scheduled audit takes place, either DAILY, WEEKLY, BIWEEKLY or MONTHLY. The start time of each audit is determined by the system.
        public let frequency: AuditFrequency
        /// The name you want to give to the scheduled audit. (Max. 128 chars)
        public let scheduledAuditName: String
        /// Metadata that can be used to manage the scheduled audit.
        public let tags: [Tag]?
        /// Which checks are performed during the scheduled audit. Checks must be enabled for your account. (Use DescribeAccountAuditConfiguration to see the list of all checks, including those that are enabled or use UpdateAccountAuditConfiguration to select which checks are enabled.)
        public let targetCheckNames: [String]

        public init(dayOfMonth: String? = nil, dayOfWeek: DayOfWeek? = nil, frequency: AuditFrequency, scheduledAuditName: String, tags: [Tag]? = nil, targetCheckNames: [String]) {
            self.dayOfMonth = dayOfMonth
            self.dayOfWeek = dayOfWeek
            self.frequency = frequency
            self.scheduledAuditName = scheduledAuditName
            self.tags = tags
            self.targetCheckNames = targetCheckNames
        }

        public func validate(name: String) throws {
            try self.validate(self.dayOfMonth, name: "dayOfMonth", parent: name, pattern: "^([1-9]|[12][0-9]|3[01])$|^LAST$")
            try self.validate(self.scheduledAuditName, name: "scheduledAuditName", parent: name, max: 128)
            try self.validate(self.scheduledAuditName, name: "scheduledAuditName", parent: name, min: 1)
            try self.validate(self.scheduledAuditName, name: "scheduledAuditName", parent: name, pattern: "[a-zA-Z0-9_-]+")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case dayOfMonth
            case dayOfWeek
            case frequency
            case tags
            case targetCheckNames
        }
    }

    public struct CreateScheduledAuditResponse: AWSDecodableShape {
        /// The ARN of the scheduled audit.
        public let scheduledAuditArn: String?

        public init(scheduledAuditArn: String? = nil) {
            self.scheduledAuditArn = scheduledAuditArn
        }

        private enum CodingKeys: String, CodingKey {
            case scheduledAuditArn
        }
    }

    public struct CreateSecurityProfileRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "securityProfileName", location: .uri(locationName: "securityProfileName"))
        ]

        /// A list of metrics whose data is retained (stored). By default, data is retained for any metric used in the profile's behaviors, but it is also retained for any metric specified here. Can be used with custom metrics; cannot be used with dimensions.
        public let additionalMetricsToRetainV2: [MetricToRetain]?
        /// Specifies the destinations to which alerts are sent. (Alerts are always sent to the console.) Alerts are generated when a device (thing) violates a behavior.
        public let alertTargets: [AlertTargetType: AlertTarget]?
        /// Specifies the behaviors that, when violated by a device (thing), cause an alert.
        public let behaviors: [Behavior]?
        /// A description of the security profile.
        public let securityProfileDescription: String?
        /// The name you are giving to the security profile.
        public let securityProfileName: String
        /// Metadata that can be used to manage the security profile.
        public let tags: [Tag]?

        public init(additionalMetricsToRetainV2: [MetricToRetain]? = nil, alertTargets: [AlertTargetType: AlertTarget]? = nil, behaviors: [Behavior]? = nil, securityProfileDescription: String? = nil, securityProfileName: String, tags: [Tag]? = nil) {
            self.additionalMetricsToRetainV2 = additionalMetricsToRetainV2
            self.alertTargets = alertTargets
            self.behaviors = behaviors
            self.securityProfileDescription = securityProfileDescription
            self.securityProfileName = securityProfileName
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.additionalMetricsToRetainV2?.forEach {
                try $0.validate(name: "\(name).additionalMetricsToRetainV2[]")
            }
            try self.alertTargets?.forEach {
                try $0.value.validate(name: "\(name).alertTargets[\"\($0.key)\"]")
            }
            try self.behaviors?.forEach {
                try $0.validate(name: "\(name).behaviors[]")
            }
            try self.validate(self.behaviors, name: "behaviors", parent: name, max: 100)
            try self.validate(self.securityProfileDescription, name: "securityProfileDescription", parent: name, max: 1000)
            try self.validate(self.securityProfileDescription, name: "securityProfileDescription", parent: name, pattern: "[\\p{Graph}\\x20]*")
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, max: 128)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, min: 1)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case additionalMetricsToRetainV2
            case alertTargets
            case behaviors
            case securityProfileDescription
            case tags
        }
    }

    public struct CreateSecurityProfileResponse: AWSDecodableShape {
        /// The ARN of the security profile.
        public let securityProfileArn: String?
        /// The name you gave to the security profile.
        public let securityProfileName: String?

        public init(securityProfileArn: String? = nil, securityProfileName: String? = nil) {
            self.securityProfileArn = securityProfileArn
            self.securityProfileName = securityProfileName
        }

        private enum CodingKeys: String, CodingKey {
            case securityProfileArn
            case securityProfileName
        }
    }

    public struct CreateStreamRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "streamId", location: .uri(locationName: "streamId"))
        ]

        /// A description of the stream.
        public let description: String?
        /// The files to stream.
        public let files: [StreamFile]
        /// An IAM role that allows the IoT service principal assumes to access your S3 files.
        public let roleArn: String
        /// The stream ID.
        public let streamId: String
        /// Metadata which can be used to manage streams.
        public let tags: [Tag]?

        public init(description: String? = nil, files: [StreamFile], roleArn: String, streamId: String, tags: [Tag]? = nil) {
            self.description = description
            self.files = files
            self.roleArn = roleArn
            self.streamId = streamId
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 2028)
            try self.validate(self.description, name: "description", parent: name, pattern: "[^\\p{C}]+")
            try self.files.forEach {
                try $0.validate(name: "\(name).files[]")
            }
            try self.validate(self.files, name: "files", parent: name, max: 50)
            try self.validate(self.files, name: "files", parent: name, min: 1)
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 20)
            try self.validate(self.streamId, name: "streamId", parent: name, max: 128)
            try self.validate(self.streamId, name: "streamId", parent: name, min: 1)
            try self.validate(self.streamId, name: "streamId", parent: name, pattern: "[a-zA-Z0-9_-]+")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case files
            case roleArn
            case tags
        }
    }

    public struct CreateStreamResponse: AWSDecodableShape {
        /// A description of the stream.
        public let description: String?
        /// The stream ARN.
        public let streamArn: String?
        /// The stream ID.
        public let streamId: String?
        /// The version of the stream.
        public let streamVersion: Int?

        public init(description: String? = nil, streamArn: String? = nil, streamId: String? = nil, streamVersion: Int? = nil) {
            self.description = description
            self.streamArn = streamArn
            self.streamId = streamId
            self.streamVersion = streamVersion
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case streamArn
            case streamId
            case streamVersion
        }
    }

    public struct CreateThingGroupRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "thingGroupName", location: .uri(locationName: "thingGroupName"))
        ]

        /// The name of the parent thing group.
        public let parentGroupName: String?
        /// Metadata which can be used to manage the thing group.
        public let tags: [Tag]?
        /// The thing group name to create.
        public let thingGroupName: String
        /// The thing group properties.
        public let thingGroupProperties: ThingGroupProperties?

        public init(parentGroupName: String? = nil, tags: [Tag]? = nil, thingGroupName: String, thingGroupProperties: ThingGroupProperties? = nil) {
            self.parentGroupName = parentGroupName
            self.tags = tags
            self.thingGroupName = thingGroupName
            self.thingGroupProperties = thingGroupProperties
        }

        public func validate(name: String) throws {
            try self.validate(self.parentGroupName, name: "parentGroupName", parent: name, max: 128)
            try self.validate(self.parentGroupName, name: "parentGroupName", parent: name, min: 1)
            try self.validate(self.parentGroupName, name: "parentGroupName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, max: 128)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, min: 1)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
            try self.thingGroupProperties?.validate(name: "\(name).thingGroupProperties")
        }

        private enum CodingKeys: String, CodingKey {
            case parentGroupName
            case tags
            case thingGroupProperties
        }
    }

    public struct CreateThingGroupResponse: AWSDecodableShape {
        /// The thing group ARN.
        public let thingGroupArn: String?
        /// The thing group ID.
        public let thingGroupId: String?
        /// The thing group name.
        public let thingGroupName: String?

        public init(thingGroupArn: String? = nil, thingGroupId: String? = nil, thingGroupName: String? = nil) {
            self.thingGroupArn = thingGroupArn
            self.thingGroupId = thingGroupId
            self.thingGroupName = thingGroupName
        }

        private enum CodingKeys: String, CodingKey {
            case thingGroupArn
            case thingGroupId
            case thingGroupName
        }
    }

    public struct CreateThingRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "thingName", location: .uri(locationName: "thingName"))
        ]

        /// The attribute payload, which consists of up to three name/value pairs in a JSON document. For example:  {\"attributes\":{\"string1\":\"string2\"}}
        public let attributePayload: AttributePayload?
        /// The name of the billing group the thing will be added to.
        public let billingGroupName: String?
        /// The name of the thing to create. You can't change a thing's name after you create it. To change a thing's name, you must create a new thing, give it the new name, and then delete the old thing.
        public let thingName: String
        /// The name of the thing type associated with the new thing.
        public let thingTypeName: String?

        public init(attributePayload: AttributePayload? = nil, billingGroupName: String? = nil, thingName: String, thingTypeName: String? = nil) {
            self.attributePayload = attributePayload
            self.billingGroupName = billingGroupName
            self.thingName = thingName
            self.thingTypeName = thingTypeName
        }

        public func validate(name: String) throws {
            try self.attributePayload?.validate(name: "\(name).attributePayload")
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, max: 128)
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, min: 1)
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, max: 128)
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, min: 1)
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case attributePayload
            case billingGroupName
            case thingTypeName
        }
    }

    public struct CreateThingResponse: AWSDecodableShape {
        /// The ARN of the new thing.
        public let thingArn: String?
        /// The thing ID.
        public let thingId: String?
        /// The name of the new thing.
        public let thingName: String?

        public init(thingArn: String? = nil, thingId: String? = nil, thingName: String? = nil) {
            self.thingArn = thingArn
            self.thingId = thingId
            self.thingName = thingName
        }

        private enum CodingKeys: String, CodingKey {
            case thingArn
            case thingId
            case thingName
        }
    }

    public struct CreateThingTypeRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "thingTypeName", location: .uri(locationName: "thingTypeName"))
        ]

        /// Metadata which can be used to manage the thing type.
        public let tags: [Tag]?
        /// The name of the thing type.
        public let thingTypeName: String
        /// The ThingTypeProperties for the thing type to create. It contains information about the new thing type including a description, and a list of searchable thing attribute names.
        public let thingTypeProperties: ThingTypeProperties?

        public init(tags: [Tag]? = nil, thingTypeName: String, thingTypeProperties: ThingTypeProperties? = nil) {
            self.tags = tags
            self.thingTypeName = thingTypeName
            self.thingTypeProperties = thingTypeProperties
        }

        public func validate(name: String) throws {
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, max: 128)
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, min: 1)
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
            try self.thingTypeProperties?.validate(name: "\(name).thingTypeProperties")
        }

        private enum CodingKeys: String, CodingKey {
            case tags
            case thingTypeProperties
        }
    }

    public struct CreateThingTypeResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the thing type.
        public let thingTypeArn: String?
        /// The thing type ID.
        public let thingTypeId: String?
        /// The name of the thing type.
        public let thingTypeName: String?

        public init(thingTypeArn: String? = nil, thingTypeId: String? = nil, thingTypeName: String? = nil) {
            self.thingTypeArn = thingTypeArn
            self.thingTypeId = thingTypeId
            self.thingTypeName = thingTypeName
        }

        private enum CodingKeys: String, CodingKey {
            case thingTypeArn
            case thingTypeId
            case thingTypeName
        }
    }

    public struct CreateTopicRuleDestinationRequest: AWSEncodableShape {
        /// The topic rule destination configuration.
        public let destinationConfiguration: TopicRuleDestinationConfiguration

        public init(destinationConfiguration: TopicRuleDestinationConfiguration) {
            self.destinationConfiguration = destinationConfiguration
        }

        public func validate(name: String) throws {
            try self.destinationConfiguration.validate(name: "\(name).destinationConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case destinationConfiguration
        }
    }

    public struct CreateTopicRuleDestinationResponse: AWSDecodableShape {
        /// The topic rule destination.
        public let topicRuleDestination: TopicRuleDestination?

        public init(topicRuleDestination: TopicRuleDestination? = nil) {
            self.topicRuleDestination = topicRuleDestination
        }

        private enum CodingKeys: String, CodingKey {
            case topicRuleDestination
        }
    }

    public struct CreateTopicRuleRequest: AWSEncodableShape & AWSShapeWithPayload {
        /// The key for the payload
        public static let _payloadPath: String = "topicRulePayload"
        public static var _encoding = [
            AWSMemberEncoding(label: "ruleName", location: .uri(locationName: "ruleName")),
            AWSMemberEncoding(label: "tags", location: .header(locationName: "x-amz-tagging"))
        ]

        /// The name of the rule.
        public let ruleName: String
        /// Metadata which can be used to manage the topic rule.  For URI Request parameters use format: ...key1=value1&amp;key2=value2... For the CLI command-line parameter use format: --tags "key1=value1&amp;key2=value2..." For the cli-input-json file use format: "tags": "key1=value1&amp;key2=value2..."
        public let tags: String?
        /// The rule payload.
        public let topicRulePayload: TopicRulePayload

        public init(ruleName: String, tags: String? = nil, topicRulePayload: TopicRulePayload) {
            self.ruleName = ruleName
            self.tags = tags
            self.topicRulePayload = topicRulePayload
        }

        public func validate(name: String) throws {
            try self.validate(self.ruleName, name: "ruleName", parent: name, max: 128)
            try self.validate(self.ruleName, name: "ruleName", parent: name, min: 1)
            try self.validate(self.ruleName, name: "ruleName", parent: name, pattern: "^[a-zA-Z0-9_]+$")
            try self.topicRulePayload.validate(name: "\(name).topicRulePayload")
        }

        private enum CodingKeys: String, CodingKey {
            case topicRulePayload
        }
    }

    public struct CustomCodeSigning: AWSEncodableShape & AWSDecodableShape {
        /// The certificate chain.
        public let certificateChain: CodeSigningCertificateChain?
        /// The hash algorithm used to code sign the file.
        public let hashAlgorithm: String?
        /// The signature for the file.
        public let signature: CodeSigningSignature?
        /// The signature algorithm used to code sign the file.
        public let signatureAlgorithm: String?

        public init(certificateChain: CodeSigningCertificateChain? = nil, hashAlgorithm: String? = nil, signature: CodeSigningSignature? = nil, signatureAlgorithm: String? = nil) {
            self.certificateChain = certificateChain
            self.hashAlgorithm = hashAlgorithm
            self.signature = signature
            self.signatureAlgorithm = signatureAlgorithm
        }

        private enum CodingKeys: String, CodingKey {
            case certificateChain
            case hashAlgorithm
            case signature
            case signatureAlgorithm
        }
    }

    public struct DeleteAccountAuditConfigurationRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "deleteScheduledAudits", location: .querystring(locationName: "deleteScheduledAudits"))
        ]

        /// If true, all scheduled audits are deleted.
        public let deleteScheduledAudits: Bool?

        public init(deleteScheduledAudits: Bool? = nil) {
            self.deleteScheduledAudits = deleteScheduledAudits
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteAccountAuditConfigurationResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteAuditSuppressionRequest: AWSEncodableShape {
        public let checkName: String
        public let resourceIdentifier: ResourceIdentifier

        public init(checkName: String, resourceIdentifier: ResourceIdentifier) {
            self.checkName = checkName
            self.resourceIdentifier = resourceIdentifier
        }

        public func validate(name: String) throws {
            try self.resourceIdentifier.validate(name: "\(name).resourceIdentifier")
        }

        private enum CodingKeys: String, CodingKey {
            case checkName
            case resourceIdentifier
        }
    }

    public struct DeleteAuditSuppressionResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteAuthorizerRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "authorizerName", location: .uri(locationName: "authorizerName"))
        ]

        /// The name of the authorizer to delete.
        public let authorizerName: String

        public init(authorizerName: String) {
            self.authorizerName = authorizerName
        }

        public func validate(name: String) throws {
            try self.validate(self.authorizerName, name: "authorizerName", parent: name, max: 128)
            try self.validate(self.authorizerName, name: "authorizerName", parent: name, min: 1)
            try self.validate(self.authorizerName, name: "authorizerName", parent: name, pattern: "[\\w=,@-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteAuthorizerResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteBillingGroupRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "billingGroupName", location: .uri(locationName: "billingGroupName")),
            AWSMemberEncoding(label: "expectedVersion", location: .querystring(locationName: "expectedVersion"))
        ]

        /// The name of the billing group.
        public let billingGroupName: String
        /// The expected version of the billing group. If the version of the billing group does not match the expected version specified in the request, the DeleteBillingGroup request is rejected with a VersionConflictException.
        public let expectedVersion: Int64?

        public init(billingGroupName: String, expectedVersion: Int64? = nil) {
            self.billingGroupName = billingGroupName
            self.expectedVersion = expectedVersion
        }

        public func validate(name: String) throws {
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, max: 128)
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, min: 1)
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteBillingGroupResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteCACertificateRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "certificateId", location: .uri(locationName: "caCertificateId"))
        ]

        /// The ID of the certificate to delete. (The last part of the certificate ARN contains the certificate ID.)
        public let certificateId: String

        public init(certificateId: String) {
            self.certificateId = certificateId
        }

        public func validate(name: String) throws {
            try self.validate(self.certificateId, name: "certificateId", parent: name, max: 64)
            try self.validate(self.certificateId, name: "certificateId", parent: name, min: 64)
            try self.validate(self.certificateId, name: "certificateId", parent: name, pattern: "(0x)?[a-fA-F0-9]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteCACertificateResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteCertificateRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "certificateId", location: .uri(locationName: "certificateId")),
            AWSMemberEncoding(label: "forceDelete", location: .querystring(locationName: "forceDelete"))
        ]

        /// The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)
        public let certificateId: String
        /// Forces the deletion of a certificate if it is inactive and is not attached to an IoT thing.
        public let forceDelete: Bool?

        public init(certificateId: String, forceDelete: Bool? = nil) {
            self.certificateId = certificateId
            self.forceDelete = forceDelete
        }

        public func validate(name: String) throws {
            try self.validate(self.certificateId, name: "certificateId", parent: name, max: 64)
            try self.validate(self.certificateId, name: "certificateId", parent: name, min: 64)
            try self.validate(self.certificateId, name: "certificateId", parent: name, pattern: "(0x)?[a-fA-F0-9]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteCustomMetricRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "metricName", location: .uri(locationName: "metricName"))
        ]

        ///  The name of the custom metric.
        public let metricName: String

        public init(metricName: String) {
            self.metricName = metricName
        }

        public func validate(name: String) throws {
            try self.validate(self.metricName, name: "metricName", parent: name, max: 128)
            try self.validate(self.metricName, name: "metricName", parent: name, min: 1)
            try self.validate(self.metricName, name: "metricName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteCustomMetricResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteDimensionRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "name", location: .uri(locationName: "name"))
        ]

        /// The unique identifier for the dimension that you want to delete.
        public let name: String

        public init(name: String) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteDimensionResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteDomainConfigurationRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainConfigurationName", location: .uri(locationName: "domainConfigurationName"))
        ]

        /// The name of the domain configuration to be deleted.
        public let domainConfigurationName: String

        public init(domainConfigurationName: String) {
            self.domainConfigurationName = domainConfigurationName
        }

        public func validate(name: String) throws {
            try self.validate(self.domainConfigurationName, name: "domainConfigurationName", parent: name, max: 128)
            try self.validate(self.domainConfigurationName, name: "domainConfigurationName", parent: name, min: 1)
            try self.validate(self.domainConfigurationName, name: "domainConfigurationName", parent: name, pattern: "[\\w.-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteDomainConfigurationResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteDynamicThingGroupRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "expectedVersion", location: .querystring(locationName: "expectedVersion")),
            AWSMemberEncoding(label: "thingGroupName", location: .uri(locationName: "thingGroupName"))
        ]

        /// The expected version of the dynamic thing group to delete.
        public let expectedVersion: Int64?
        /// The name of the dynamic thing group to delete.
        public let thingGroupName: String

        public init(expectedVersion: Int64? = nil, thingGroupName: String) {
            self.expectedVersion = expectedVersion
            self.thingGroupName = thingGroupName
        }

        public func validate(name: String) throws {
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, max: 128)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, min: 1)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteDynamicThingGroupResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteJobExecutionRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "executionNumber", location: .uri(locationName: "executionNumber")),
            AWSMemberEncoding(label: "force", location: .querystring(locationName: "force")),
            AWSMemberEncoding(label: "jobId", location: .uri(locationName: "jobId")),
            AWSMemberEncoding(label: "namespaceId", location: .querystring(locationName: "namespaceId")),
            AWSMemberEncoding(label: "thingName", location: .uri(locationName: "thingName"))
        ]

        /// The ID of the job execution to be deleted. The executionNumber refers to the execution of a particular job on a particular device. Note that once a job execution is deleted, the executionNumber may be reused by IoT, so be sure you get and use the correct value here.
        public let executionNumber: Int64
        /// (Optional) When true, you can delete a job execution which is "IN_PROGRESS". Otherwise, you can only delete a job execution which is in a terminal state ("SUCCEEDED", "FAILED", "REJECTED", "REMOVED" or "CANCELED") or an exception will occur. The default is false.  Deleting a job execution which is "IN_PROGRESS", will cause the device to be unable to access job information or update the job execution status. Use caution and ensure that the device is able to recover to a valid state.
        public let force: Bool?
        /// The ID of the job whose execution on a particular device will be deleted.
        public let jobId: String
        /// The namespace used to indicate that a job is a customer-managed job. When you specify a value for this parameter, AWS IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.  $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/   The namespaceId feature is in public preview.
        public let namespaceId: String?
        /// The name of the thing whose job execution will be deleted.
        public let thingName: String

        public init(executionNumber: Int64, force: Bool? = nil, jobId: String, namespaceId: String? = nil, thingName: String) {
            self.executionNumber = executionNumber
            self.force = force
            self.jobId = jobId
            self.namespaceId = namespaceId
            self.thingName = thingName
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 64)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "[a-zA-Z0-9_-]+")
            try self.validate(self.namespaceId, name: "namespaceId", parent: name, max: 64)
            try self.validate(self.namespaceId, name: "namespaceId", parent: name, min: 1)
            try self.validate(self.namespaceId, name: "namespaceId", parent: name, pattern: "[a-zA-Z0-9_-]+")
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteJobRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "force", location: .querystring(locationName: "force")),
            AWSMemberEncoding(label: "jobId", location: .uri(locationName: "jobId")),
            AWSMemberEncoding(label: "namespaceId", location: .querystring(locationName: "namespaceId"))
        ]

        /// (Optional) When true, you can delete a job which is "IN_PROGRESS". Otherwise, you can only delete a job which is in a terminal state ("COMPLETED" or "CANCELED") or an exception will occur. The default is false.  Deleting a job which is "IN_PROGRESS", will cause a device which is executing the job to be unable to access job information or update the job execution status. Use caution and ensure that each device executing a job which is deleted is able to recover to a valid state.
        public let force: Bool?
        /// The ID of the job to be deleted. After a job deletion is completed, you may reuse this jobId when you create a new job. However, this is not recommended, and you must ensure that your devices are not using the jobId to refer to the deleted job.
        public let jobId: String
        /// The namespace used to indicate that a job is a customer-managed job. When you specify a value for this parameter, AWS IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.  $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/   The namespaceId feature is in public preview.
        public let namespaceId: String?

        public init(force: Bool? = nil, jobId: String, namespaceId: String? = nil) {
            self.force = force
            self.jobId = jobId
            self.namespaceId = namespaceId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 64)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "[a-zA-Z0-9_-]+")
            try self.validate(self.namespaceId, name: "namespaceId", parent: name, max: 64)
            try self.validate(self.namespaceId, name: "namespaceId", parent: name, min: 1)
            try self.validate(self.namespaceId, name: "namespaceId", parent: name, pattern: "[a-zA-Z0-9_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteMitigationActionRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "actionName", location: .uri(locationName: "actionName"))
        ]

        /// The name of the mitigation action that you want to delete.
        public let actionName: String

        public init(actionName: String) {
            self.actionName = actionName
        }

        public func validate(name: String) throws {
            try self.validate(self.actionName, name: "actionName", parent: name, max: 128)
            try self.validate(self.actionName, name: "actionName", parent: name, pattern: "[a-zA-Z0-9_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteMitigationActionResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteOTAUpdateRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "deleteStream", location: .querystring(locationName: "deleteStream")),
            AWSMemberEncoding(label: "forceDeleteAWSJob", location: .querystring(locationName: "forceDeleteAWSJob")),
            AWSMemberEncoding(label: "otaUpdateId", location: .uri(locationName: "otaUpdateId"))
        ]

        /// When true, the stream created by the OTAUpdate process is deleted when the OTA update is deleted. Ignored if the stream specified in the OTAUpdate is supplied by the user.
        public let deleteStream: Bool?
        /// When true, deletes the AWS job created by the OTAUpdate process even if it is "IN_PROGRESS". Otherwise, if the job is not in a terminal state ("COMPLETED" or "CANCELED") an exception will occur. The default is false.
        public let forceDeleteAWSJob: Bool?
        /// The ID of the OTA update to delete.
        public let otaUpdateId: String

        public init(deleteStream: Bool? = nil, forceDeleteAWSJob: Bool? = nil, otaUpdateId: String) {
            self.deleteStream = deleteStream
            self.forceDeleteAWSJob = forceDeleteAWSJob
            self.otaUpdateId = otaUpdateId
        }

        public func validate(name: String) throws {
            try self.validate(self.otaUpdateId, name: "otaUpdateId", parent: name, max: 128)
            try self.validate(self.otaUpdateId, name: "otaUpdateId", parent: name, min: 1)
            try self.validate(self.otaUpdateId, name: "otaUpdateId", parent: name, pattern: "[a-zA-Z0-9_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteOTAUpdateResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeletePolicyRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "policyName", location: .uri(locationName: "policyName"))
        ]

        /// The name of the policy to delete.
        public let policyName: String

        public init(policyName: String) {
            self.policyName = policyName
        }

        public func validate(name: String) throws {
            try self.validate(self.policyName, name: "policyName", parent: name, max: 128)
            try self.validate(self.policyName, name: "policyName", parent: name, min: 1)
            try self.validate(self.policyName, name: "policyName", parent: name, pattern: "[\\w+=,.@-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeletePolicyVersionRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "policyName", location: .uri(locationName: "policyName")),
            AWSMemberEncoding(label: "policyVersionId", location: .uri(locationName: "policyVersionId"))
        ]

        /// The name of the policy.
        public let policyName: String
        /// The policy version ID.
        public let policyVersionId: String

        public init(policyName: String, policyVersionId: String) {
            self.policyName = policyName
            self.policyVersionId = policyVersionId
        }

        public func validate(name: String) throws {
            try self.validate(self.policyName, name: "policyName", parent: name, max: 128)
            try self.validate(self.policyName, name: "policyName", parent: name, min: 1)
            try self.validate(self.policyName, name: "policyName", parent: name, pattern: "[\\w+=,.@-]+")
            try self.validate(self.policyVersionId, name: "policyVersionId", parent: name, pattern: "[0-9]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteProvisioningTemplateRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "templateName", location: .uri(locationName: "templateName"))
        ]

        /// The name of the fleet provision template to delete.
        public let templateName: String

        public init(templateName: String) {
            self.templateName = templateName
        }

        public func validate(name: String) throws {
            try self.validate(self.templateName, name: "templateName", parent: name, max: 36)
            try self.validate(self.templateName, name: "templateName", parent: name, min: 1)
            try self.validate(self.templateName, name: "templateName", parent: name, pattern: "^[0-9A-Za-z_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteProvisioningTemplateResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteProvisioningTemplateVersionRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "templateName", location: .uri(locationName: "templateName")),
            AWSMemberEncoding(label: "versionId", location: .uri(locationName: "versionId"))
        ]

        /// The name of the fleet provisioning template version to delete.
        public let templateName: String
        /// The fleet provisioning template version ID to delete.
        public let versionId: Int

        public init(templateName: String, versionId: Int) {
            self.templateName = templateName
            self.versionId = versionId
        }

        public func validate(name: String) throws {
            try self.validate(self.templateName, name: "templateName", parent: name, max: 36)
            try self.validate(self.templateName, name: "templateName", parent: name, min: 1)
            try self.validate(self.templateName, name: "templateName", parent: name, pattern: "^[0-9A-Za-z_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteProvisioningTemplateVersionResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteRegistrationCodeRequest: AWSEncodableShape {
        public init() {}
    }

    public struct DeleteRegistrationCodeResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteRoleAliasRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "roleAlias", location: .uri(locationName: "roleAlias"))
        ]

        /// The role alias to delete.
        public let roleAlias: String

        public init(roleAlias: String) {
            self.roleAlias = roleAlias
        }

        public func validate(name: String) throws {
            try self.validate(self.roleAlias, name: "roleAlias", parent: name, max: 128)
            try self.validate(self.roleAlias, name: "roleAlias", parent: name, min: 1)
            try self.validate(self.roleAlias, name: "roleAlias", parent: name, pattern: "[\\w=,@-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteRoleAliasResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteScheduledAuditRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "scheduledAuditName", location: .uri(locationName: "scheduledAuditName"))
        ]

        /// The name of the scheduled audit you want to delete.
        public let scheduledAuditName: String

        public init(scheduledAuditName: String) {
            self.scheduledAuditName = scheduledAuditName
        }

        public func validate(name: String) throws {
            try self.validate(self.scheduledAuditName, name: "scheduledAuditName", parent: name, max: 128)
            try self.validate(self.scheduledAuditName, name: "scheduledAuditName", parent: name, min: 1)
            try self.validate(self.scheduledAuditName, name: "scheduledAuditName", parent: name, pattern: "[a-zA-Z0-9_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteScheduledAuditResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteSecurityProfileRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "expectedVersion", location: .querystring(locationName: "expectedVersion")),
            AWSMemberEncoding(label: "securityProfileName", location: .uri(locationName: "securityProfileName"))
        ]

        /// The expected version of the security profile. A new version is generated whenever the security profile is updated. If you specify a value that is different from the actual version, a VersionConflictException is thrown.
        public let expectedVersion: Int64?
        /// The name of the security profile to be deleted.
        public let securityProfileName: String

        public init(expectedVersion: Int64? = nil, securityProfileName: String) {
            self.expectedVersion = expectedVersion
            self.securityProfileName = securityProfileName
        }

        public func validate(name: String) throws {
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, max: 128)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, min: 1)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteSecurityProfileResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteStreamRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "streamId", location: .uri(locationName: "streamId"))
        ]

        /// The stream ID.
        public let streamId: String

        public init(streamId: String) {
            self.streamId = streamId
        }

        public func validate(name: String) throws {
            try self.validate(self.streamId, name: "streamId", parent: name, max: 128)
            try self.validate(self.streamId, name: "streamId", parent: name, min: 1)
            try self.validate(self.streamId, name: "streamId", parent: name, pattern: "[a-zA-Z0-9_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteStreamResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteThingGroupRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "expectedVersion", location: .querystring(locationName: "expectedVersion")),
            AWSMemberEncoding(label: "thingGroupName", location: .uri(locationName: "thingGroupName"))
        ]

        /// The expected version of the thing group to delete.
        public let expectedVersion: Int64?
        /// The name of the thing group to delete.
        public let thingGroupName: String

        public init(expectedVersion: Int64? = nil, thingGroupName: String) {
            self.expectedVersion = expectedVersion
            self.thingGroupName = thingGroupName
        }

        public func validate(name: String) throws {
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, max: 128)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, min: 1)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteThingGroupResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteThingRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "expectedVersion", location: .querystring(locationName: "expectedVersion")),
            AWSMemberEncoding(label: "thingName", location: .uri(locationName: "thingName"))
        ]

        /// The expected version of the thing record in the registry. If the version of the record in the registry does not match the expected version specified in the request, the DeleteThing request is rejected with a VersionConflictException.
        public let expectedVersion: Int64?
        /// The name of the thing to delete.
        public let thingName: String

        public init(expectedVersion: Int64? = nil, thingName: String) {
            self.expectedVersion = expectedVersion
            self.thingName = thingName
        }

        public func validate(name: String) throws {
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteThingResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteThingTypeRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "thingTypeName", location: .uri(locationName: "thingTypeName"))
        ]

        /// The name of the thing type.
        public let thingTypeName: String

        public init(thingTypeName: String) {
            self.thingTypeName = thingTypeName
        }

        public func validate(name: String) throws {
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, max: 128)
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, min: 1)
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteThingTypeResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteTopicRuleDestinationRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "arn", location: .uri(locationName: "arn"))
        ]

        /// The ARN of the topic rule destination to delete.
        public let arn: String

        public init(arn: String) {
            self.arn = arn
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteTopicRuleDestinationResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DeleteTopicRuleRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "ruleName", location: .uri(locationName: "ruleName"))
        ]

        /// The name of the rule.
        public let ruleName: String

        public init(ruleName: String) {
            self.ruleName = ruleName
        }

        public func validate(name: String) throws {
            try self.validate(self.ruleName, name: "ruleName", parent: name, max: 128)
            try self.validate(self.ruleName, name: "ruleName", parent: name, min: 1)
            try self.validate(self.ruleName, name: "ruleName", parent: name, pattern: "^[a-zA-Z0-9_]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteV2LoggingLevelRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "targetName", location: .querystring(locationName: "targetName")),
            AWSMemberEncoding(label: "targetType", location: .querystring(locationName: "targetType"))
        ]

        /// The name of the resource for which you are configuring logging.
        public let targetName: String
        /// The type of resource for which you are configuring logging. Must be THING_Group.
        public let targetType: LogTargetType

        public init(targetName: String, targetType: LogTargetType) {
            self.targetName = targetName
            self.targetType = targetType
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct Denied: AWSDecodableShape {
        /// Information that explicitly denies the authorization.
        public let explicitDeny: ExplicitDeny?
        /// Information that implicitly denies the authorization. When a policy doesn't explicitly deny or allow an action on a resource it is considered an implicit deny.
        public let implicitDeny: ImplicitDeny?

        public init(explicitDeny: ExplicitDeny? = nil, implicitDeny: ImplicitDeny? = nil) {
            self.explicitDeny = explicitDeny
            self.implicitDeny = implicitDeny
        }

        private enum CodingKeys: String, CodingKey {
            case explicitDeny
            case implicitDeny
        }
    }

    public struct DeprecateThingTypeRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "thingTypeName", location: .uri(locationName: "thingTypeName"))
        ]

        /// The name of the thing type to deprecate.
        public let thingTypeName: String
        /// Whether to undeprecate a deprecated thing type. If true, the thing type will not be deprecated anymore and you can associate it with things.
        public let undoDeprecate: Bool?

        public init(thingTypeName: String, undoDeprecate: Bool? = nil) {
            self.thingTypeName = thingTypeName
            self.undoDeprecate = undoDeprecate
        }

        public func validate(name: String) throws {
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, max: 128)
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, min: 1)
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case undoDeprecate
        }
    }

    public struct DeprecateThingTypeResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DescribeAccountAuditConfigurationRequest: AWSEncodableShape {
        public init() {}
    }

    public struct DescribeAccountAuditConfigurationResponse: AWSDecodableShape {
        /// Which audit checks are enabled and disabled for this account.
        public let auditCheckConfigurations: [String: AuditCheckConfiguration]?
        /// Information about the targets to which audit notifications are sent for this account.
        public let auditNotificationTargetConfigurations: [AuditNotificationType: AuditNotificationTarget]?
        /// The ARN of the role that grants permission to AWS IoT to access information about your devices, policies, certificates, and other items as required when performing an audit. On the first call to UpdateAccountAuditConfiguration, this parameter is required.
        public let roleArn: String?

        public init(auditCheckConfigurations: [String: AuditCheckConfiguration]? = nil, auditNotificationTargetConfigurations: [AuditNotificationType: AuditNotificationTarget]? = nil, roleArn: String? = nil) {
            self.auditCheckConfigurations = auditCheckConfigurations
            self.auditNotificationTargetConfigurations = auditNotificationTargetConfigurations
            self.roleArn = roleArn
        }

        private enum CodingKeys: String, CodingKey {
            case auditCheckConfigurations
            case auditNotificationTargetConfigurations
            case roleArn
        }
    }

    public struct DescribeAuditFindingRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "findingId", location: .uri(locationName: "findingId"))
        ]

        /// A unique identifier for a single audit finding. You can use this identifier to apply mitigation actions to the finding.
        public let findingId: String

        public init(findingId: String) {
            self.findingId = findingId
        }

        public func validate(name: String) throws {
            try self.validate(self.findingId, name: "findingId", parent: name, max: 128)
            try self.validate(self.findingId, name: "findingId", parent: name, min: 1)
            try self.validate(self.findingId, name: "findingId", parent: name, pattern: "[a-zA-Z0-9_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeAuditFindingResponse: AWSDecodableShape {
        public let finding: AuditFinding?

        public init(finding: AuditFinding? = nil) {
            self.finding = finding
        }

        private enum CodingKeys: String, CodingKey {
            case finding
        }
    }

    public struct DescribeAuditMitigationActionsTaskRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "taskId", location: .uri(locationName: "taskId"))
        ]

        /// The unique identifier for the audit mitigation task.
        public let taskId: String

        public init(taskId: String) {
            self.taskId = taskId
        }

        public func validate(name: String) throws {
            try self.validate(self.taskId, name: "taskId", parent: name, max: 128)
            try self.validate(self.taskId, name: "taskId", parent: name, min: 1)
            try self.validate(self.taskId, name: "taskId", parent: name, pattern: "[a-zA-Z0-9_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeAuditMitigationActionsTaskResponse: AWSDecodableShape {
        /// Specifies the mitigation actions and their parameters that are applied as part of this task.
        public let actionsDefinition: [MitigationAction]?
        /// Specifies the mitigation actions that should be applied to specific audit checks.
        public let auditCheckToActionsMapping: [String: [String]]?
        /// The date and time when the task was completed or canceled.
        public let endTime: Date?
        /// The date and time when the task was started.
        public let startTime: Date?
        /// Identifies the findings to which the mitigation actions are applied. This can be by audit checks, by audit task, or a set of findings.
        public let target: AuditMitigationActionsTaskTarget?
        /// Aggregate counts of the results when the mitigation tasks were applied to the findings for this audit mitigation actions task.
        public let taskStatistics: [String: TaskStatisticsForAuditCheck]?
        /// The current status of the task.
        public let taskStatus: AuditMitigationActionsTaskStatus?

        public init(actionsDefinition: [MitigationAction]? = nil, auditCheckToActionsMapping: [String: [String]]? = nil, endTime: Date? = nil, startTime: Date? = nil, target: AuditMitigationActionsTaskTarget? = nil, taskStatistics: [String: TaskStatisticsForAuditCheck]? = nil, taskStatus: AuditMitigationActionsTaskStatus? = nil) {
            self.actionsDefinition = actionsDefinition
            self.auditCheckToActionsMapping = auditCheckToActionsMapping
            self.endTime = endTime
            self.startTime = startTime
            self.target = target
            self.taskStatistics = taskStatistics
            self.taskStatus = taskStatus
        }

        private enum CodingKeys: String, CodingKey {
            case actionsDefinition
            case auditCheckToActionsMapping
            case endTime
            case startTime
            case target
            case taskStatistics
            case taskStatus
        }
    }

    public struct DescribeAuditSuppressionRequest: AWSEncodableShape {
        public let checkName: String
        public let resourceIdentifier: ResourceIdentifier

        public init(checkName: String, resourceIdentifier: ResourceIdentifier) {
            self.checkName = checkName
            self.resourceIdentifier = resourceIdentifier
        }

        public func validate(name: String) throws {
            try self.resourceIdentifier.validate(name: "\(name).resourceIdentifier")
        }

        private enum CodingKeys: String, CodingKey {
            case checkName
            case resourceIdentifier
        }
    }

    public struct DescribeAuditSuppressionResponse: AWSDecodableShape {
        public let checkName: String?
        ///  The description of the audit suppression.
        public let description: String?
        ///  The epoch timestamp in seconds at which this suppression expires.
        public let expirationDate: Date?
        public let resourceIdentifier: ResourceIdentifier?
        ///  Indicates whether a suppression should exist indefinitely or not.
        public let suppressIndefinitely: Bool?

        public init(checkName: String? = nil, description: String? = nil, expirationDate: Date? = nil, resourceIdentifier: ResourceIdentifier? = nil, suppressIndefinitely: Bool? = nil) {
            self.checkName = checkName
            self.description = description
            self.expirationDate = expirationDate
            self.resourceIdentifier = resourceIdentifier
            self.suppressIndefinitely = suppressIndefinitely
        }

        private enum CodingKeys: String, CodingKey {
            case checkName
            case description
            case expirationDate
            case resourceIdentifier
            case suppressIndefinitely
        }
    }

    public struct DescribeAuditTaskRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "taskId", location: .uri(locationName: "taskId"))
        ]

        /// The ID of the audit whose information you want to get.
        public let taskId: String

        public init(taskId: String) {
            self.taskId = taskId
        }

        public func validate(name: String) throws {
            try self.validate(self.taskId, name: "taskId", parent: name, max: 40)
            try self.validate(self.taskId, name: "taskId", parent: name, min: 1)
            try self.validate(self.taskId, name: "taskId", parent: name, pattern: "[a-zA-Z0-9\\-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeAuditTaskResponse: AWSDecodableShape {
        /// Detailed information about each check performed during this audit.
        public let auditDetails: [String: AuditCheckDetails]?
        /// The name of the scheduled audit (only if the audit was a scheduled audit).
        public let scheduledAuditName: String?
        /// The time the audit started.
        public let taskStartTime: Date?
        /// Statistical information about the audit.
        public let taskStatistics: TaskStatistics?
        /// The status of the audit: one of "IN_PROGRESS", "COMPLETED", "FAILED", or "CANCELED".
        public let taskStatus: AuditTaskStatus?
        /// The type of audit: "ON_DEMAND_AUDIT_TASK" or "SCHEDULED_AUDIT_TASK".
        public let taskType: AuditTaskType?

        public init(auditDetails: [String: AuditCheckDetails]? = nil, scheduledAuditName: String? = nil, taskStartTime: Date? = nil, taskStatistics: TaskStatistics? = nil, taskStatus: AuditTaskStatus? = nil, taskType: AuditTaskType? = nil) {
            self.auditDetails = auditDetails
            self.scheduledAuditName = scheduledAuditName
            self.taskStartTime = taskStartTime
            self.taskStatistics = taskStatistics
            self.taskStatus = taskStatus
            self.taskType = taskType
        }

        private enum CodingKeys: String, CodingKey {
            case auditDetails
            case scheduledAuditName
            case taskStartTime
            case taskStatistics
            case taskStatus
            case taskType
        }
    }

    public struct DescribeAuthorizerRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "authorizerName", location: .uri(locationName: "authorizerName"))
        ]

        /// The name of the authorizer to describe.
        public let authorizerName: String

        public init(authorizerName: String) {
            self.authorizerName = authorizerName
        }

        public func validate(name: String) throws {
            try self.validate(self.authorizerName, name: "authorizerName", parent: name, max: 128)
            try self.validate(self.authorizerName, name: "authorizerName", parent: name, min: 1)
            try self.validate(self.authorizerName, name: "authorizerName", parent: name, pattern: "[\\w=,@-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeAuthorizerResponse: AWSDecodableShape {
        /// The authorizer description.
        public let authorizerDescription: AuthorizerDescription?

        public init(authorizerDescription: AuthorizerDescription? = nil) {
            self.authorizerDescription = authorizerDescription
        }

        private enum CodingKeys: String, CodingKey {
            case authorizerDescription
        }
    }

    public struct DescribeBillingGroupRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "billingGroupName", location: .uri(locationName: "billingGroupName"))
        ]

        /// The name of the billing group.
        public let billingGroupName: String

        public init(billingGroupName: String) {
            self.billingGroupName = billingGroupName
        }

        public func validate(name: String) throws {
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, max: 128)
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, min: 1)
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeBillingGroupResponse: AWSDecodableShape {
        /// The ARN of the billing group.
        public let billingGroupArn: String?
        /// The ID of the billing group.
        public let billingGroupId: String?
        /// Additional information about the billing group.
        public let billingGroupMetadata: BillingGroupMetadata?
        /// The name of the billing group.
        public let billingGroupName: String?
        /// The properties of the billing group.
        public let billingGroupProperties: BillingGroupProperties?
        /// The version of the billing group.
        public let version: Int64?

        public init(billingGroupArn: String? = nil, billingGroupId: String? = nil, billingGroupMetadata: BillingGroupMetadata? = nil, billingGroupName: String? = nil, billingGroupProperties: BillingGroupProperties? = nil, version: Int64? = nil) {
            self.billingGroupArn = billingGroupArn
            self.billingGroupId = billingGroupId
            self.billingGroupMetadata = billingGroupMetadata
            self.billingGroupName = billingGroupName
            self.billingGroupProperties = billingGroupProperties
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case billingGroupArn
            case billingGroupId
            case billingGroupMetadata
            case billingGroupName
            case billingGroupProperties
            case version
        }
    }

    public struct DescribeCACertificateRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "certificateId", location: .uri(locationName: "caCertificateId"))
        ]

        /// The CA certificate identifier.
        public let certificateId: String

        public init(certificateId: String) {
            self.certificateId = certificateId
        }

        public func validate(name: String) throws {
            try self.validate(self.certificateId, name: "certificateId", parent: name, max: 64)
            try self.validate(self.certificateId, name: "certificateId", parent: name, min: 64)
            try self.validate(self.certificateId, name: "certificateId", parent: name, pattern: "(0x)?[a-fA-F0-9]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeCACertificateResponse: AWSDecodableShape {
        /// The CA certificate description.
        public let certificateDescription: CACertificateDescription?
        /// Information about the registration configuration.
        public let registrationConfig: RegistrationConfig?

        public init(certificateDescription: CACertificateDescription? = nil, registrationConfig: RegistrationConfig? = nil) {
            self.certificateDescription = certificateDescription
            self.registrationConfig = registrationConfig
        }

        private enum CodingKeys: String, CodingKey {
            case certificateDescription
            case registrationConfig
        }
    }

    public struct DescribeCertificateRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "certificateId", location: .uri(locationName: "certificateId"))
        ]

        /// The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)
        public let certificateId: String

        public init(certificateId: String) {
            self.certificateId = certificateId
        }

        public func validate(name: String) throws {
            try self.validate(self.certificateId, name: "certificateId", parent: name, max: 64)
            try self.validate(self.certificateId, name: "certificateId", parent: name, min: 64)
            try self.validate(self.certificateId, name: "certificateId", parent: name, pattern: "(0x)?[a-fA-F0-9]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeCertificateResponse: AWSDecodableShape {
        /// The description of the certificate.
        public let certificateDescription: CertificateDescription?

        public init(certificateDescription: CertificateDescription? = nil) {
            self.certificateDescription = certificateDescription
        }

        private enum CodingKeys: String, CodingKey {
            case certificateDescription
        }
    }

    public struct DescribeCustomMetricRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "metricName", location: .uri(locationName: "metricName"))
        ]

        ///  The name of the custom metric.
        public let metricName: String

        public init(metricName: String) {
            self.metricName = metricName
        }

        public func validate(name: String) throws {
            try self.validate(self.metricName, name: "metricName", parent: name, max: 128)
            try self.validate(self.metricName, name: "metricName", parent: name, min: 1)
            try self.validate(self.metricName, name: "metricName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeCustomMetricResponse: AWSDecodableShape {
        ///  The creation date of the custom metric in milliseconds since epoch.
        public let creationDate: Date?
        ///  Field represents a friendly name in the console for the custom metric; doesn't have to be unique. Don't use this name as the metric identifier in the device metric report. Can be updated.
        public let displayName: String?
        ///  The time the custom metric was last modified in milliseconds since epoch.
        public let lastModifiedDate: Date?
        ///  The Amazon Resource Number (ARN) of the custom metric.
        public let metricArn: String?
        ///  The name of the custom metric.
        public let metricName: String?
        ///  The type of the custom metric. Types include string-list, ip-address-list, number-list, and number.
        public let metricType: CustomMetricType?

        public init(creationDate: Date? = nil, displayName: String? = nil, lastModifiedDate: Date? = nil, metricArn: String? = nil, metricName: String? = nil, metricType: CustomMetricType? = nil) {
            self.creationDate = creationDate
            self.displayName = displayName
            self.lastModifiedDate = lastModifiedDate
            self.metricArn = metricArn
            self.metricName = metricName
            self.metricType = metricType
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate
            case displayName
            case lastModifiedDate
            case metricArn
            case metricName
            case metricType
        }
    }

    public struct DescribeDefaultAuthorizerRequest: AWSEncodableShape {
        public init() {}
    }

    public struct DescribeDefaultAuthorizerResponse: AWSDecodableShape {
        /// The default authorizer's description.
        public let authorizerDescription: AuthorizerDescription?

        public init(authorizerDescription: AuthorizerDescription? = nil) {
            self.authorizerDescription = authorizerDescription
        }

        private enum CodingKeys: String, CodingKey {
            case authorizerDescription
        }
    }

    public struct DescribeDetectMitigationActionsTaskRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "taskId", location: .uri(locationName: "taskId"))
        ]

        ///  The unique identifier of the task.
        public let taskId: String

        public init(taskId: String) {
            self.taskId = taskId
        }

        public func validate(name: String) throws {
            try self.validate(self.taskId, name: "taskId", parent: name, max: 128)
            try self.validate(self.taskId, name: "taskId", parent: name, min: 1)
            try self.validate(self.taskId, name: "taskId", parent: name, pattern: "[a-zA-Z0-9_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeDetectMitigationActionsTaskResponse: AWSDecodableShape {
        ///  The description of a task.
        public let taskSummary: DetectMitigationActionsTaskSummary?

        public init(taskSummary: DetectMitigationActionsTaskSummary? = nil) {
            self.taskSummary = taskSummary
        }

        private enum CodingKeys: String, CodingKey {
            case taskSummary
        }
    }

    public struct DescribeDimensionRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "name", location: .uri(locationName: "name"))
        ]

        /// The unique identifier for the dimension.
        public let name: String

        public init(name: String) {
            self.name = name
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeDimensionResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) for the dimension.
        public let arn: String?
        /// The date the dimension was created.
        public let creationDate: Date?
        /// The date the dimension was last modified.
        public let lastModifiedDate: Date?
        /// The unique identifier for the dimension.
        public let name: String?
        /// The value or list of values used to scope the dimension. For example, for topic filters, this is the pattern used to match the MQTT topic name.
        public let stringValues: [String]?
        /// The type of the dimension.
        public let type: DimensionType?

        public init(arn: String? = nil, creationDate: Date? = nil, lastModifiedDate: Date? = nil, name: String? = nil, stringValues: [String]? = nil, type: DimensionType? = nil) {
            self.arn = arn
            self.creationDate = creationDate
            self.lastModifiedDate = lastModifiedDate
            self.name = name
            self.stringValues = stringValues
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case arn
            case creationDate
            case lastModifiedDate
            case name
            case stringValues
            case type
        }
    }

    public struct DescribeDomainConfigurationRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainConfigurationName", location: .uri(locationName: "domainConfigurationName"))
        ]

        /// The name of the domain configuration.
        public let domainConfigurationName: String

        public init(domainConfigurationName: String) {
            self.domainConfigurationName = domainConfigurationName
        }

        public func validate(name: String) throws {
            try self.validate(self.domainConfigurationName, name: "domainConfigurationName", parent: name, max: 128)
            try self.validate(self.domainConfigurationName, name: "domainConfigurationName", parent: name, min: 1)
            try self.validate(self.domainConfigurationName, name: "domainConfigurationName", parent: name, pattern: "[\\w.:-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeDomainConfigurationResponse: AWSDecodableShape {
        /// An object that specifies the authorization service for a domain.
        public let authorizerConfig: AuthorizerConfig?
        /// The ARN of the domain configuration.
        public let domainConfigurationArn: String?
        /// The name of the domain configuration.
        public let domainConfigurationName: String?
        /// A Boolean value that specifies the current state of the domain configuration.
        public let domainConfigurationStatus: DomainConfigurationStatus?
        /// The name of the domain.
        public let domainName: String?
        /// The type of the domain.
        public let domainType: DomainType?
        /// The date and time the domain configuration's status was last changed.
        public let lastStatusChangeDate: Date?
        /// A list containing summary information about the server certificate included in the domain configuration.
        public let serverCertificates: [ServerCertificateSummary]?
        /// The type of service delivered by the endpoint.
        public let serviceType: ServiceType?

        public init(authorizerConfig: AuthorizerConfig? = nil, domainConfigurationArn: String? = nil, domainConfigurationName: String? = nil, domainConfigurationStatus: DomainConfigurationStatus? = nil, domainName: String? = nil, domainType: DomainType? = nil, lastStatusChangeDate: Date? = nil, serverCertificates: [ServerCertificateSummary]? = nil, serviceType: ServiceType? = nil) {
            self.authorizerConfig = authorizerConfig
            self.domainConfigurationArn = domainConfigurationArn
            self.domainConfigurationName = domainConfigurationName
            self.domainConfigurationStatus = domainConfigurationStatus
            self.domainName = domainName
            self.domainType = domainType
            self.lastStatusChangeDate = lastStatusChangeDate
            self.serverCertificates = serverCertificates
            self.serviceType = serviceType
        }

        private enum CodingKeys: String, CodingKey {
            case authorizerConfig
            case domainConfigurationArn
            case domainConfigurationName
            case domainConfigurationStatus
            case domainName
            case domainType
            case lastStatusChangeDate
            case serverCertificates
            case serviceType
        }
    }

    public struct DescribeEndpointRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "endpointType", location: .querystring(locationName: "endpointType"))
        ]

        /// The endpoint type. Valid endpoint types include:    iot:Data - Returns a VeriSign signed data endpoint.      iot:Data-ATS - Returns an ATS signed data endpoint.      iot:CredentialProvider - Returns an AWS IoT credentials provider API endpoint.      iot:Jobs - Returns an AWS IoT device management Jobs API endpoint.   We strongly recommend that customers use the newer iot:Data-ATS endpoint type to avoid issues related to the widespread distrust of Symantec certificate authorities.
        public let endpointType: String?

        public init(endpointType: String? = nil) {
            self.endpointType = endpointType
        }

        public func validate(name: String) throws {
            try self.validate(self.endpointType, name: "endpointType", parent: name, max: 128)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeEndpointResponse: AWSDecodableShape {
        /// The endpoint. The format of the endpoint is as follows: identifier.iot.region.amazonaws.com.
        public let endpointAddress: String?

        public init(endpointAddress: String? = nil) {
            self.endpointAddress = endpointAddress
        }

        private enum CodingKeys: String, CodingKey {
            case endpointAddress
        }
    }

    public struct DescribeEventConfigurationsRequest: AWSEncodableShape {
        public init() {}
    }

    public struct DescribeEventConfigurationsResponse: AWSDecodableShape {
        /// The creation date of the event configuration.
        public let creationDate: Date?
        /// The event configurations.
        public let eventConfigurations: [EventType: Configuration]?
        /// The date the event configurations were last modified.
        public let lastModifiedDate: Date?

        public init(creationDate: Date? = nil, eventConfigurations: [EventType: Configuration]? = nil, lastModifiedDate: Date? = nil) {
            self.creationDate = creationDate
            self.eventConfigurations = eventConfigurations
            self.lastModifiedDate = lastModifiedDate
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate
            case eventConfigurations
            case lastModifiedDate
        }
    }

    public struct DescribeIndexRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "indexName", location: .uri(locationName: "indexName"))
        ]

        /// The index name.
        public let indexName: String

        public init(indexName: String) {
            self.indexName = indexName
        }

        public func validate(name: String) throws {
            try self.validate(self.indexName, name: "indexName", parent: name, max: 128)
            try self.validate(self.indexName, name: "indexName", parent: name, min: 1)
            try self.validate(self.indexName, name: "indexName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeIndexResponse: AWSDecodableShape {
        /// The index name.
        public let indexName: String?
        /// The index status.
        public let indexStatus: IndexStatus?
        /// Contains a value that specifies the type of indexing performed. Valid values are:   REGISTRY – Your thing index contains only registry data.   REGISTRY_AND_SHADOW - Your thing index contains registry data and shadow data.   REGISTRY_AND_CONNECTIVITY_STATUS - Your thing index contains registry data and thing connectivity status data.   REGISTRY_AND_SHADOW_AND_CONNECTIVITY_STATUS - Your thing index contains registry data, shadow data, and thing connectivity status data.
        public let schema: String?

        public init(indexName: String? = nil, indexStatus: IndexStatus? = nil, schema: String? = nil) {
            self.indexName = indexName
            self.indexStatus = indexStatus
            self.schema = schema
        }

        private enum CodingKeys: String, CodingKey {
            case indexName
            case indexStatus
            case schema
        }
    }

    public struct DescribeJobExecutionRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "executionNumber", location: .querystring(locationName: "executionNumber")),
            AWSMemberEncoding(label: "jobId", location: .uri(locationName: "jobId")),
            AWSMemberEncoding(label: "thingName", location: .uri(locationName: "thingName"))
        ]

        /// A string (consisting of the digits "0" through "9" which is used to specify a particular job execution on a particular device.
        public let executionNumber: Int64?
        /// The unique identifier you assigned to this job when it was created.
        public let jobId: String
        /// The name of the thing on which the job execution is running.
        public let thingName: String

        public init(executionNumber: Int64? = nil, jobId: String, thingName: String) {
            self.executionNumber = executionNumber
            self.jobId = jobId
            self.thingName = thingName
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 64)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "[a-zA-Z0-9_-]+")
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeJobExecutionResponse: AWSDecodableShape {
        /// Information about the job execution.
        public let execution: JobExecution?

        public init(execution: JobExecution? = nil) {
            self.execution = execution
        }

        private enum CodingKeys: String, CodingKey {
            case execution
        }
    }

    public struct DescribeJobRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "jobId", location: .uri(locationName: "jobId"))
        ]

        /// The unique identifier you assigned to this job when it was created.
        public let jobId: String

        public init(jobId: String) {
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 64)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "[a-zA-Z0-9_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeJobResponse: AWSDecodableShape {
        /// An S3 link to the job document.
        public let documentSource: String?
        /// Information about the job.
        public let job: Job?

        public init(documentSource: String? = nil, job: Job? = nil) {
            self.documentSource = documentSource
            self.job = job
        }

        private enum CodingKeys: String, CodingKey {
            case documentSource
            case job
        }
    }

    public struct DescribeMitigationActionRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "actionName", location: .uri(locationName: "actionName"))
        ]

        /// The friendly name that uniquely identifies the mitigation action.
        public let actionName: String

        public init(actionName: String) {
            self.actionName = actionName
        }

        public func validate(name: String) throws {
            try self.validate(self.actionName, name: "actionName", parent: name, max: 128)
            try self.validate(self.actionName, name: "actionName", parent: name, pattern: "[a-zA-Z0-9_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeMitigationActionResponse: AWSDecodableShape {
        /// The ARN that identifies this migration action.
        public let actionArn: String?
        /// A unique identifier for this action.
        public let actionId: String?
        /// The friendly name that uniquely identifies the mitigation action.
        public let actionName: String?
        /// Parameters that control how the mitigation action is applied, specific to the type of mitigation action.
        public let actionParams: MitigationActionParams?
        /// The type of mitigation action.
        public let actionType: MitigationActionType?
        /// The date and time when the mitigation action was added to your AWS account.
        public let creationDate: Date?
        /// The date and time when the mitigation action was last changed.
        public let lastModifiedDate: Date?
        /// The ARN of the IAM role used to apply this action.
        public let roleArn: String?

        public init(actionArn: String? = nil, actionId: String? = nil, actionName: String? = nil, actionParams: MitigationActionParams? = nil, actionType: MitigationActionType? = nil, creationDate: Date? = nil, lastModifiedDate: Date? = nil, roleArn: String? = nil) {
            self.actionArn = actionArn
            self.actionId = actionId
            self.actionName = actionName
            self.actionParams = actionParams
            self.actionType = actionType
            self.creationDate = creationDate
            self.lastModifiedDate = lastModifiedDate
            self.roleArn = roleArn
        }

        private enum CodingKeys: String, CodingKey {
            case actionArn
            case actionId
            case actionName
            case actionParams
            case actionType
            case creationDate
            case lastModifiedDate
            case roleArn
        }
    }

    public struct DescribeProvisioningTemplateRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "templateName", location: .uri(locationName: "templateName"))
        ]

        /// The name of the fleet provisioning template.
        public let templateName: String

        public init(templateName: String) {
            self.templateName = templateName
        }

        public func validate(name: String) throws {
            try self.validate(self.templateName, name: "templateName", parent: name, max: 36)
            try self.validate(self.templateName, name: "templateName", parent: name, min: 1)
            try self.validate(self.templateName, name: "templateName", parent: name, pattern: "^[0-9A-Za-z_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeProvisioningTemplateResponse: AWSDecodableShape {
        /// The date when the fleet provisioning template was created.
        public let creationDate: Date?
        /// The default fleet template version ID.
        public let defaultVersionId: Int?
        /// The description of the fleet provisioning template.
        public let description: String?
        /// True if the fleet provisioning template is enabled, otherwise false.
        public let enabled: Bool?
        /// The date when the fleet provisioning template was last modified.
        public let lastModifiedDate: Date?
        /// Gets information about a pre-provisioned hook.
        public let preProvisioningHook: ProvisioningHook?
        /// The ARN of the role associated with the provisioning template. This IoT role grants permission to provision a device.
        public let provisioningRoleArn: String?
        /// The ARN of the fleet provisioning template.
        public let templateArn: String?
        /// The JSON formatted contents of the fleet provisioning template.
        public let templateBody: String?
        /// The name of the fleet provisioning template.
        public let templateName: String?

        public init(creationDate: Date? = nil, defaultVersionId: Int? = nil, description: String? = nil, enabled: Bool? = nil, lastModifiedDate: Date? = nil, preProvisioningHook: ProvisioningHook? = nil, provisioningRoleArn: String? = nil, templateArn: String? = nil, templateBody: String? = nil, templateName: String? = nil) {
            self.creationDate = creationDate
            self.defaultVersionId = defaultVersionId
            self.description = description
            self.enabled = enabled
            self.lastModifiedDate = lastModifiedDate
            self.preProvisioningHook = preProvisioningHook
            self.provisioningRoleArn = provisioningRoleArn
            self.templateArn = templateArn
            self.templateBody = templateBody
            self.templateName = templateName
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate
            case defaultVersionId
            case description
            case enabled
            case lastModifiedDate
            case preProvisioningHook
            case provisioningRoleArn
            case templateArn
            case templateBody
            case templateName
        }
    }

    public struct DescribeProvisioningTemplateVersionRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "templateName", location: .uri(locationName: "templateName")),
            AWSMemberEncoding(label: "versionId", location: .uri(locationName: "versionId"))
        ]

        /// The template name.
        public let templateName: String
        /// The fleet provisioning template version ID.
        public let versionId: Int

        public init(templateName: String, versionId: Int) {
            self.templateName = templateName
            self.versionId = versionId
        }

        public func validate(name: String) throws {
            try self.validate(self.templateName, name: "templateName", parent: name, max: 36)
            try self.validate(self.templateName, name: "templateName", parent: name, min: 1)
            try self.validate(self.templateName, name: "templateName", parent: name, pattern: "^[0-9A-Za-z_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeProvisioningTemplateVersionResponse: AWSDecodableShape {
        /// The date when the fleet provisioning template version was created.
        public let creationDate: Date?
        /// True if the fleet provisioning template version is the default version.
        public let isDefaultVersion: Bool?
        /// The JSON formatted contents of the fleet provisioning template version.
        public let templateBody: String?
        /// The fleet provisioning template version ID.
        public let versionId: Int?

        public init(creationDate: Date? = nil, isDefaultVersion: Bool? = nil, templateBody: String? = nil, versionId: Int? = nil) {
            self.creationDate = creationDate
            self.isDefaultVersion = isDefaultVersion
            self.templateBody = templateBody
            self.versionId = versionId
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate
            case isDefaultVersion
            case templateBody
            case versionId
        }
    }

    public struct DescribeRoleAliasRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "roleAlias", location: .uri(locationName: "roleAlias"))
        ]

        /// The role alias to describe.
        public let roleAlias: String

        public init(roleAlias: String) {
            self.roleAlias = roleAlias
        }

        public func validate(name: String) throws {
            try self.validate(self.roleAlias, name: "roleAlias", parent: name, max: 128)
            try self.validate(self.roleAlias, name: "roleAlias", parent: name, min: 1)
            try self.validate(self.roleAlias, name: "roleAlias", parent: name, pattern: "[\\w=,@-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeRoleAliasResponse: AWSDecodableShape {
        /// The role alias description.
        public let roleAliasDescription: RoleAliasDescription?

        public init(roleAliasDescription: RoleAliasDescription? = nil) {
            self.roleAliasDescription = roleAliasDescription
        }

        private enum CodingKeys: String, CodingKey {
            case roleAliasDescription
        }
    }

    public struct DescribeScheduledAuditRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "scheduledAuditName", location: .uri(locationName: "scheduledAuditName"))
        ]

        /// The name of the scheduled audit whose information you want to get.
        public let scheduledAuditName: String

        public init(scheduledAuditName: String) {
            self.scheduledAuditName = scheduledAuditName
        }

        public func validate(name: String) throws {
            try self.validate(self.scheduledAuditName, name: "scheduledAuditName", parent: name, max: 128)
            try self.validate(self.scheduledAuditName, name: "scheduledAuditName", parent: name, min: 1)
            try self.validate(self.scheduledAuditName, name: "scheduledAuditName", parent: name, pattern: "[a-zA-Z0-9_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeScheduledAuditResponse: AWSDecodableShape {
        /// The day of the month on which the scheduled audit takes place. This is will be 1 through 31 or LAST. If days 29-31 are specified, and the month does not have that many days, the audit takes place on the LAST day of the month.
        public let dayOfMonth: String?
        /// The day of the week on which the scheduled audit takes place, either one of SUN, MON, TUE, WED, THU, FRI, or SAT.
        public let dayOfWeek: DayOfWeek?
        /// How often the scheduled audit takes place, either one of DAILY, WEEKLY, BIWEEKLY, or MONTHLY. The start time of each audit is determined by the system.
        public let frequency: AuditFrequency?
        /// The ARN of the scheduled audit.
        public let scheduledAuditArn: String?
        /// The name of the scheduled audit.
        public let scheduledAuditName: String?
        /// Which checks are performed during the scheduled audit. Checks must be enabled for your account. (Use DescribeAccountAuditConfiguration to see the list of all checks, including those that are enabled or use UpdateAccountAuditConfiguration to select which checks are enabled.)
        public let targetCheckNames: [String]?

        public init(dayOfMonth: String? = nil, dayOfWeek: DayOfWeek? = nil, frequency: AuditFrequency? = nil, scheduledAuditArn: String? = nil, scheduledAuditName: String? = nil, targetCheckNames: [String]? = nil) {
            self.dayOfMonth = dayOfMonth
            self.dayOfWeek = dayOfWeek
            self.frequency = frequency
            self.scheduledAuditArn = scheduledAuditArn
            self.scheduledAuditName = scheduledAuditName
            self.targetCheckNames = targetCheckNames
        }

        private enum CodingKeys: String, CodingKey {
            case dayOfMonth
            case dayOfWeek
            case frequency
            case scheduledAuditArn
            case scheduledAuditName
            case targetCheckNames
        }
    }

    public struct DescribeSecurityProfileRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "securityProfileName", location: .uri(locationName: "securityProfileName"))
        ]

        /// The name of the security profile whose information you want to get.
        public let securityProfileName: String

        public init(securityProfileName: String) {
            self.securityProfileName = securityProfileName
        }

        public func validate(name: String) throws {
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, max: 128)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, min: 1)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeSecurityProfileResponse: AWSDecodableShape {
        /// A list of metrics whose data is retained (stored). By default, data is retained for any metric used in the profile's behaviors, but it is also retained for any metric specified here.
        public let additionalMetricsToRetainV2: [MetricToRetain]?
        /// Where the alerts are sent. (Alerts are always sent to the console.)
        public let alertTargets: [AlertTargetType: AlertTarget]?
        /// Specifies the behaviors that, when violated by a device (thing), cause an alert.
        public let behaviors: [Behavior]?
        /// The time the security profile was created.
        public let creationDate: Date?
        /// The time the security profile was last modified.
        public let lastModifiedDate: Date?
        /// The ARN of the security profile.
        public let securityProfileArn: String?
        /// A description of the security profile (associated with the security profile when it was created or updated).
        public let securityProfileDescription: String?
        /// The name of the security profile.
        public let securityProfileName: String?
        /// The version of the security profile. A new version is generated whenever the security profile is updated.
        public let version: Int64?

        public init(additionalMetricsToRetainV2: [MetricToRetain]? = nil, alertTargets: [AlertTargetType: AlertTarget]? = nil, behaviors: [Behavior]? = nil, creationDate: Date? = nil, lastModifiedDate: Date? = nil, securityProfileArn: String? = nil, securityProfileDescription: String? = nil, securityProfileName: String? = nil, version: Int64? = nil) {
            self.additionalMetricsToRetainV2 = additionalMetricsToRetainV2
            self.alertTargets = alertTargets
            self.behaviors = behaviors
            self.creationDate = creationDate
            self.lastModifiedDate = lastModifiedDate
            self.securityProfileArn = securityProfileArn
            self.securityProfileDescription = securityProfileDescription
            self.securityProfileName = securityProfileName
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case additionalMetricsToRetainV2
            case alertTargets
            case behaviors
            case creationDate
            case lastModifiedDate
            case securityProfileArn
            case securityProfileDescription
            case securityProfileName
            case version
        }
    }

    public struct DescribeStreamRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "streamId", location: .uri(locationName: "streamId"))
        ]

        /// The stream ID.
        public let streamId: String

        public init(streamId: String) {
            self.streamId = streamId
        }

        public func validate(name: String) throws {
            try self.validate(self.streamId, name: "streamId", parent: name, max: 128)
            try self.validate(self.streamId, name: "streamId", parent: name, min: 1)
            try self.validate(self.streamId, name: "streamId", parent: name, pattern: "[a-zA-Z0-9_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeStreamResponse: AWSDecodableShape {
        /// Information about the stream.
        public let streamInfo: StreamInfo?

        public init(streamInfo: StreamInfo? = nil) {
            self.streamInfo = streamInfo
        }

        private enum CodingKeys: String, CodingKey {
            case streamInfo
        }
    }

    public struct DescribeThingGroupRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "thingGroupName", location: .uri(locationName: "thingGroupName"))
        ]

        /// The name of the thing group.
        public let thingGroupName: String

        public init(thingGroupName: String) {
            self.thingGroupName = thingGroupName
        }

        public func validate(name: String) throws {
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, max: 128)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, min: 1)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeThingGroupResponse: AWSDecodableShape {
        /// The dynamic thing group index name.
        public let indexName: String?
        /// The dynamic thing group search query string.
        public let queryString: String?
        /// The dynamic thing group query version.
        public let queryVersion: String?
        /// The dynamic thing group status.
        public let status: DynamicGroupStatus?
        /// The thing group ARN.
        public let thingGroupArn: String?
        /// The thing group ID.
        public let thingGroupId: String?
        /// Thing group metadata.
        public let thingGroupMetadata: ThingGroupMetadata?
        /// The name of the thing group.
        public let thingGroupName: String?
        /// The thing group properties.
        public let thingGroupProperties: ThingGroupProperties?
        /// The version of the thing group.
        public let version: Int64?

        public init(indexName: String? = nil, queryString: String? = nil, queryVersion: String? = nil, status: DynamicGroupStatus? = nil, thingGroupArn: String? = nil, thingGroupId: String? = nil, thingGroupMetadata: ThingGroupMetadata? = nil, thingGroupName: String? = nil, thingGroupProperties: ThingGroupProperties? = nil, version: Int64? = nil) {
            self.indexName = indexName
            self.queryString = queryString
            self.queryVersion = queryVersion
            self.status = status
            self.thingGroupArn = thingGroupArn
            self.thingGroupId = thingGroupId
            self.thingGroupMetadata = thingGroupMetadata
            self.thingGroupName = thingGroupName
            self.thingGroupProperties = thingGroupProperties
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case indexName
            case queryString
            case queryVersion
            case status
            case thingGroupArn
            case thingGroupId
            case thingGroupMetadata
            case thingGroupName
            case thingGroupProperties
            case version
        }
    }

    public struct DescribeThingRegistrationTaskRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "taskId", location: .uri(locationName: "taskId"))
        ]

        /// The task ID.
        public let taskId: String

        public init(taskId: String) {
            self.taskId = taskId
        }

        public func validate(name: String) throws {
            try self.validate(self.taskId, name: "taskId", parent: name, max: 40)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeThingRegistrationTaskResponse: AWSDecodableShape {
        /// The task creation date.
        public let creationDate: Date?
        /// The number of things that failed to be provisioned.
        public let failureCount: Int?
        /// The S3 bucket that contains the input file.
        public let inputFileBucket: String?
        /// The input file key.
        public let inputFileKey: String?
        /// The date when the task was last modified.
        public let lastModifiedDate: Date?
        /// The message.
        public let message: String?
        /// The progress of the bulk provisioning task expressed as a percentage.
        public let percentageProgress: Int?
        /// The role ARN that grants access to the input file bucket.
        public let roleArn: String?
        /// The status of the bulk thing provisioning task.
        public let status: Status?
        /// The number of things successfully provisioned.
        public let successCount: Int?
        /// The task ID.
        public let taskId: String?
        /// The task's template.
        public let templateBody: String?

        public init(creationDate: Date? = nil, failureCount: Int? = nil, inputFileBucket: String? = nil, inputFileKey: String? = nil, lastModifiedDate: Date? = nil, message: String? = nil, percentageProgress: Int? = nil, roleArn: String? = nil, status: Status? = nil, successCount: Int? = nil, taskId: String? = nil, templateBody: String? = nil) {
            self.creationDate = creationDate
            self.failureCount = failureCount
            self.inputFileBucket = inputFileBucket
            self.inputFileKey = inputFileKey
            self.lastModifiedDate = lastModifiedDate
            self.message = message
            self.percentageProgress = percentageProgress
            self.roleArn = roleArn
            self.status = status
            self.successCount = successCount
            self.taskId = taskId
            self.templateBody = templateBody
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate
            case failureCount
            case inputFileBucket
            case inputFileKey
            case lastModifiedDate
            case message
            case percentageProgress
            case roleArn
            case status
            case successCount
            case taskId
            case templateBody
        }
    }

    public struct DescribeThingRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "thingName", location: .uri(locationName: "thingName"))
        ]

        /// The name of the thing.
        public let thingName: String

        public init(thingName: String) {
            self.thingName = thingName
        }

        public func validate(name: String) throws {
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeThingResponse: AWSDecodableShape {
        /// The thing attributes.
        public let attributes: [String: String]?
        /// The name of the billing group the thing belongs to.
        public let billingGroupName: String?
        /// The default MQTT client ID. For a typical device, the thing name is also used as the default MQTT client ID. Although we don’t require a mapping between a thing's registry name and its use of MQTT client IDs, certificates, or shadow state, we recommend that you choose a thing name and use it as the MQTT client ID for the registry and the Device Shadow service. This lets you better organize your AWS IoT fleet without removing the flexibility of the underlying device certificate model or shadows.
        public let defaultClientId: String?
        /// The ARN of the thing to describe.
        public let thingArn: String?
        /// The ID of the thing to describe.
        public let thingId: String?
        /// The name of the thing.
        public let thingName: String?
        /// The thing type name.
        public let thingTypeName: String?
        /// The current version of the thing record in the registry.  To avoid unintentional changes to the information in the registry, you can pass the version information in the expectedVersion parameter of the UpdateThing and DeleteThing calls.
        public let version: Int64?

        public init(attributes: [String: String]? = nil, billingGroupName: String? = nil, defaultClientId: String? = nil, thingArn: String? = nil, thingId: String? = nil, thingName: String? = nil, thingTypeName: String? = nil, version: Int64? = nil) {
            self.attributes = attributes
            self.billingGroupName = billingGroupName
            self.defaultClientId = defaultClientId
            self.thingArn = thingArn
            self.thingId = thingId
            self.thingName = thingName
            self.thingTypeName = thingTypeName
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case attributes
            case billingGroupName
            case defaultClientId
            case thingArn
            case thingId
            case thingName
            case thingTypeName
            case version
        }
    }

    public struct DescribeThingTypeRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "thingTypeName", location: .uri(locationName: "thingTypeName"))
        ]

        /// The name of the thing type.
        public let thingTypeName: String

        public init(thingTypeName: String) {
            self.thingTypeName = thingTypeName
        }

        public func validate(name: String) throws {
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, max: 128)
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, min: 1)
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DescribeThingTypeResponse: AWSDecodableShape {
        /// The thing type ARN.
        public let thingTypeArn: String?
        /// The thing type ID.
        public let thingTypeId: String?
        /// The ThingTypeMetadata contains additional information about the thing type including: creation date and time, a value indicating whether the thing type is deprecated, and a date and time when it was deprecated.
        public let thingTypeMetadata: ThingTypeMetadata?
        /// The name of the thing type.
        public let thingTypeName: String?
        /// The ThingTypeProperties contains information about the thing type including description, and a list of searchable thing attribute names.
        public let thingTypeProperties: ThingTypeProperties?

        public init(thingTypeArn: String? = nil, thingTypeId: String? = nil, thingTypeMetadata: ThingTypeMetadata? = nil, thingTypeName: String? = nil, thingTypeProperties: ThingTypeProperties? = nil) {
            self.thingTypeArn = thingTypeArn
            self.thingTypeId = thingTypeId
            self.thingTypeMetadata = thingTypeMetadata
            self.thingTypeName = thingTypeName
            self.thingTypeProperties = thingTypeProperties
        }

        private enum CodingKeys: String, CodingKey {
            case thingTypeArn
            case thingTypeId
            case thingTypeMetadata
            case thingTypeName
            case thingTypeProperties
        }
    }

    public struct Destination: AWSEncodableShape & AWSDecodableShape {
        /// Describes the location in S3 of the updated firmware.
        public let s3Destination: S3Destination?

        public init(s3Destination: S3Destination? = nil) {
            self.s3Destination = s3Destination
        }

        public func validate(name: String) throws {
            try self.s3Destination?.validate(name: "\(name).s3Destination")
        }

        private enum CodingKeys: String, CodingKey {
            case s3Destination
        }
    }

    public struct DetachPolicyRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "policyName", location: .uri(locationName: "policyName"))
        ]

        /// The policy to detach.
        public let policyName: String
        /// The target from which the policy will be detached.
        public let target: String

        public init(policyName: String, target: String) {
            self.policyName = policyName
            self.target = target
        }

        public func validate(name: String) throws {
            try self.validate(self.policyName, name: "policyName", parent: name, max: 128)
            try self.validate(self.policyName, name: "policyName", parent: name, min: 1)
            try self.validate(self.policyName, name: "policyName", parent: name, pattern: "[\\w+=,.@-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case target
        }
    }

    public struct DetachPrincipalPolicyRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "policyName", location: .uri(locationName: "policyName")),
            AWSMemberEncoding(label: "principal", location: .header(locationName: "x-amzn-iot-principal"))
        ]

        /// The name of the policy to detach.
        public let policyName: String
        /// The principal. Valid principals are CertificateArn (arn:aws:iot:region:accountId:cert/certificateId), thingGroupArn (arn:aws:iot:region:accountId:thinggroup/groupName) and CognitoId (region:id).
        public let principal: String

        public init(policyName: String, principal: String) {
            self.policyName = policyName
            self.principal = principal
        }

        public func validate(name: String) throws {
            try self.validate(self.policyName, name: "policyName", parent: name, max: 128)
            try self.validate(self.policyName, name: "policyName", parent: name, min: 1)
            try self.validate(self.policyName, name: "policyName", parent: name, pattern: "[\\w+=,.@-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DetachSecurityProfileRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "securityProfileName", location: .uri(locationName: "securityProfileName")),
            AWSMemberEncoding(label: "securityProfileTargetArn", location: .querystring(locationName: "securityProfileTargetArn"))
        ]

        /// The security profile that is detached.
        public let securityProfileName: String
        /// The ARN of the thing group from which the security profile is detached.
        public let securityProfileTargetArn: String

        public init(securityProfileName: String, securityProfileTargetArn: String) {
            self.securityProfileName = securityProfileName
            self.securityProfileTargetArn = securityProfileTargetArn
        }

        public func validate(name: String) throws {
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, max: 128)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, min: 1)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DetachSecurityProfileResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DetachThingPrincipalRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "principal", location: .header(locationName: "x-amzn-principal")),
            AWSMemberEncoding(label: "thingName", location: .uri(locationName: "thingName"))
        ]

        /// If the principal is a certificate, this value must be ARN of the certificate. If the principal is an Amazon Cognito identity, this value must be the ID of the Amazon Cognito identity.
        public let principal: String
        /// The name of the thing.
        public let thingName: String

        public init(principal: String, thingName: String) {
            self.principal = principal
            self.thingName = thingName
        }

        public func validate(name: String) throws {
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DetachThingPrincipalResponse: AWSDecodableShape {
        public init() {}
    }

    public struct DetectMitigationActionExecution: AWSDecodableShape {
        ///  The friendly name that uniquely identifies the mitigation action.
        public let actionName: String?
        ///  The error code of a mitigation action.
        public let errorCode: String?
        ///  The date a mitigation action ended.
        public let executionEndDate: Date?
        ///  The date a mitigation action was started.
        public let executionStartDate: Date?
        ///  The message of a mitigation action.
        public let message: String?
        ///  The status of a mitigation action.
        public let status: DetectMitigationActionExecutionStatus?
        ///  The unique identifier of the task.
        public let taskId: String?
        ///  The name of the thing.
        public let thingName: String?
        ///  The unique identifier of the violation.
        public let violationId: String?

        public init(actionName: String? = nil, errorCode: String? = nil, executionEndDate: Date? = nil, executionStartDate: Date? = nil, message: String? = nil, status: DetectMitigationActionExecutionStatus? = nil, taskId: String? = nil, thingName: String? = nil, violationId: String? = nil) {
            self.actionName = actionName
            self.errorCode = errorCode
            self.executionEndDate = executionEndDate
            self.executionStartDate = executionStartDate
            self.message = message
            self.status = status
            self.taskId = taskId
            self.thingName = thingName
            self.violationId = violationId
        }

        private enum CodingKeys: String, CodingKey {
            case actionName
            case errorCode
            case executionEndDate
            case executionStartDate
            case message
            case status
            case taskId
            case thingName
            case violationId
        }
    }

    public struct DetectMitigationActionsTaskStatistics: AWSDecodableShape {
        ///  The actions that were performed.
        public let actionsExecuted: Int64?
        ///  The actions that failed.
        public let actionsFailed: Int64?
        ///  The actions that were skipped.
        public let actionsSkipped: Int64?

        public init(actionsExecuted: Int64? = nil, actionsFailed: Int64? = nil, actionsSkipped: Int64? = nil) {
            self.actionsExecuted = actionsExecuted
            self.actionsFailed = actionsFailed
            self.actionsSkipped = actionsSkipped
        }

        private enum CodingKeys: String, CodingKey {
            case actionsExecuted
            case actionsFailed
            case actionsSkipped
        }
    }

    public struct DetectMitigationActionsTaskSummary: AWSDecodableShape {
        ///  The definition of the actions.
        public let actionsDefinition: [MitigationAction]?
        ///  Includes only active violations.
        public let onlyActiveViolationsIncluded: Bool?
        ///  Includes suppressed alerts.
        public let suppressedAlertsIncluded: Bool?
        ///  Specifies the ML Detect findings to which the mitigation actions are applied.
        public let target: DetectMitigationActionsTaskTarget?
        ///  The date the task ended.
        public let taskEndTime: Date?
        ///  The unique identifier of the task.
        public let taskId: String?
        ///  The date the task started.
        public let taskStartTime: Date?
        ///  The statistics of a mitigation action task.
        public let taskStatistics: DetectMitigationActionsTaskStatistics?
        ///  The status of the task.
        public let taskStatus: DetectMitigationActionsTaskStatus?
        ///  Specifies the time period of which violation events occurred between.
        public let violationEventOccurrenceRange: ViolationEventOccurrenceRange?

        public init(actionsDefinition: [MitigationAction]? = nil, onlyActiveViolationsIncluded: Bool? = nil, suppressedAlertsIncluded: Bool? = nil, target: DetectMitigationActionsTaskTarget? = nil, taskEndTime: Date? = nil, taskId: String? = nil, taskStartTime: Date? = nil, taskStatistics: DetectMitigationActionsTaskStatistics? = nil, taskStatus: DetectMitigationActionsTaskStatus? = nil, violationEventOccurrenceRange: ViolationEventOccurrenceRange? = nil) {
            self.actionsDefinition = actionsDefinition
            self.onlyActiveViolationsIncluded = onlyActiveViolationsIncluded
            self.suppressedAlertsIncluded = suppressedAlertsIncluded
            self.target = target
            self.taskEndTime = taskEndTime
            self.taskId = taskId
            self.taskStartTime = taskStartTime
            self.taskStatistics = taskStatistics
            self.taskStatus = taskStatus
            self.violationEventOccurrenceRange = violationEventOccurrenceRange
        }

        private enum CodingKeys: String, CodingKey {
            case actionsDefinition
            case onlyActiveViolationsIncluded
            case suppressedAlertsIncluded
            case target
            case taskEndTime
            case taskId
            case taskStartTime
            case taskStatistics
            case taskStatus
            case violationEventOccurrenceRange
        }
    }

    public struct DetectMitigationActionsTaskTarget: AWSEncodableShape & AWSDecodableShape {
        ///  The name of the behavior.
        public let behaviorName: String?
        ///  The name of the security profile.
        public let securityProfileName: String?
        ///  The unique identifiers of the violations.
        public let violationIds: [String]?

        public init(behaviorName: String? = nil, securityProfileName: String? = nil, violationIds: [String]? = nil) {
            self.behaviorName = behaviorName
            self.securityProfileName = securityProfileName
            self.violationIds = violationIds
        }

        public func validate(name: String) throws {
            try self.validate(self.behaviorName, name: "behaviorName", parent: name, max: 128)
            try self.validate(self.behaviorName, name: "behaviorName", parent: name, min: 1)
            try self.validate(self.behaviorName, name: "behaviorName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, max: 128)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, min: 1)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
            try self.violationIds?.forEach {
                try validate($0, name: "violationIds[]", parent: name, max: 128)
                try validate($0, name: "violationIds[]", parent: name, min: 1)
                try validate($0, name: "violationIds[]", parent: name, pattern: "[a-zA-Z0-9\\-]+")
            }
            try self.validate(self.violationIds, name: "violationIds", parent: name, max: 25)
            try self.validate(self.violationIds, name: "violationIds", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case behaviorName
            case securityProfileName
            case violationIds
        }
    }

    public struct DisableTopicRuleRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "ruleName", location: .uri(locationName: "ruleName"))
        ]

        /// The name of the rule to disable.
        public let ruleName: String

        public init(ruleName: String) {
            self.ruleName = ruleName
        }

        public func validate(name: String) throws {
            try self.validate(self.ruleName, name: "ruleName", parent: name, max: 128)
            try self.validate(self.ruleName, name: "ruleName", parent: name, min: 1)
            try self.validate(self.ruleName, name: "ruleName", parent: name, pattern: "^[a-zA-Z0-9_]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DomainConfigurationSummary: AWSDecodableShape {
        /// The ARN of the domain configuration.
        public let domainConfigurationArn: String?
        /// The name of the domain configuration. This value must be unique to a region.
        public let domainConfigurationName: String?
        /// The type of service delivered by the endpoint.
        public let serviceType: ServiceType?

        public init(domainConfigurationArn: String? = nil, domainConfigurationName: String? = nil, serviceType: ServiceType? = nil) {
            self.domainConfigurationArn = domainConfigurationArn
            self.domainConfigurationName = domainConfigurationName
            self.serviceType = serviceType
        }

        private enum CodingKeys: String, CodingKey {
            case domainConfigurationArn
            case domainConfigurationName
            case serviceType
        }
    }

    public struct DynamoDBAction: AWSEncodableShape & AWSDecodableShape {
        /// The hash key name.
        public let hashKeyField: String
        /// The hash key type. Valid values are "STRING" or "NUMBER"
        public let hashKeyType: DynamoKeyType?
        /// The hash key value.
        public let hashKeyValue: String
        /// The type of operation to be performed. This follows the substitution template, so it can be ${operation}, but the substitution must result in one of the following: INSERT, UPDATE, or DELETE.
        public let operation: String?
        /// The action payload. This name can be customized.
        public let payloadField: String?
        /// The range key name.
        public let rangeKeyField: String?
        /// The range key type. Valid values are "STRING" or "NUMBER"
        public let rangeKeyType: DynamoKeyType?
        /// The range key value.
        public let rangeKeyValue: String?
        /// The ARN of the IAM role that grants access to the DynamoDB table.
        public let roleArn: String
        /// The name of the DynamoDB table.
        public let tableName: String

        public init(hashKeyField: String, hashKeyType: DynamoKeyType? = nil, hashKeyValue: String, operation: String? = nil, payloadField: String? = nil, rangeKeyField: String? = nil, rangeKeyType: DynamoKeyType? = nil, rangeKeyValue: String? = nil, roleArn: String, tableName: String) {
            self.hashKeyField = hashKeyField
            self.hashKeyType = hashKeyType
            self.hashKeyValue = hashKeyValue
            self.operation = operation
            self.payloadField = payloadField
            self.rangeKeyField = rangeKeyField
            self.rangeKeyType = rangeKeyType
            self.rangeKeyValue = rangeKeyValue
            self.roleArn = roleArn
            self.tableName = tableName
        }

        private enum CodingKeys: String, CodingKey {
            case hashKeyField
            case hashKeyType
            case hashKeyValue
            case operation
            case payloadField
            case rangeKeyField
            case rangeKeyType
            case rangeKeyValue
            case roleArn
            case tableName
        }
    }

    public struct DynamoDBv2Action: AWSEncodableShape & AWSDecodableShape {
        /// Specifies the DynamoDB table to which the message data will be written. For example:  { "dynamoDBv2": { "roleArn": "aws:iam:12341251:my-role" "putItem": { "tableName": "my-table" } } }  Each attribute in the message payload will be written to a separate column in the DynamoDB database.
        public let putItem: PutItemInput
        /// The ARN of the IAM role that grants access to the DynamoDB table.
        public let roleArn: String

        public init(putItem: PutItemInput, roleArn: String) {
            self.putItem = putItem
            self.roleArn = roleArn
        }

        private enum CodingKeys: String, CodingKey {
            case putItem
            case roleArn
        }
    }

    public struct EffectivePolicy: AWSDecodableShape {
        /// The policy ARN.
        public let policyArn: String?
        /// The IAM policy document.
        public let policyDocument: String?
        /// The policy name.
        public let policyName: String?

        public init(policyArn: String? = nil, policyDocument: String? = nil, policyName: String? = nil) {
            self.policyArn = policyArn
            self.policyDocument = policyDocument
            self.policyName = policyName
        }

        private enum CodingKeys: String, CodingKey {
            case policyArn
            case policyDocument
            case policyName
        }
    }

    public struct ElasticsearchAction: AWSEncodableShape & AWSDecodableShape {
        /// The endpoint of your Elasticsearch domain.
        public let endpoint: String
        /// The unique identifier for the document you are storing.
        public let id: String
        /// The Elasticsearch index where you want to store your data.
        public let index: String
        /// The IAM role ARN that has access to Elasticsearch.
        public let roleArn: String
        /// The type of document you are storing.
        public let type: String

        public init(endpoint: String, id: String, index: String, roleArn: String, type: String) {
            self.endpoint = endpoint
            self.id = id
            self.index = index
            self.roleArn = roleArn
            self.type = type
        }

        public func validate(name: String) throws {
            try self.validate(self.endpoint, name: "endpoint", parent: name, pattern: "https?://.*")
        }

        private enum CodingKeys: String, CodingKey {
            case endpoint
            case id
            case index
            case roleArn
            case type
        }
    }

    public struct EnableIoTLoggingParams: AWSEncodableShape & AWSDecodableShape {
        /// Specifies the type of information to be logged.
        public let logLevel: LogLevel
        /// The Amazon Resource Name (ARN) of the IAM role used for logging.
        public let roleArnForLogging: String

        public init(logLevel: LogLevel, roleArnForLogging: String) {
            self.logLevel = logLevel
            self.roleArnForLogging = roleArnForLogging
        }

        public func validate(name: String) throws {
            try self.validate(self.roleArnForLogging, name: "roleArnForLogging", parent: name, max: 2048)
            try self.validate(self.roleArnForLogging, name: "roleArnForLogging", parent: name, min: 20)
        }

        private enum CodingKeys: String, CodingKey {
            case logLevel
            case roleArnForLogging
        }
    }

    public struct EnableTopicRuleRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "ruleName", location: .uri(locationName: "ruleName"))
        ]

        /// The name of the topic rule to enable.
        public let ruleName: String

        public init(ruleName: String) {
            self.ruleName = ruleName
        }

        public func validate(name: String) throws {
            try self.validate(self.ruleName, name: "ruleName", parent: name, max: 128)
            try self.validate(self.ruleName, name: "ruleName", parent: name, min: 1)
            try self.validate(self.ruleName, name: "ruleName", parent: name, pattern: "^[a-zA-Z0-9_]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ErrorInfo: AWSDecodableShape {
        /// The error code.
        public let code: String?
        /// The error message.
        public let message: String?

        public init(code: String? = nil, message: String? = nil) {
            self.code = code
            self.message = message
        }

        private enum CodingKeys: String, CodingKey {
            case code
            case message
        }
    }

    public struct ExplicitDeny: AWSDecodableShape {
        /// The policies that denied the authorization.
        public let policies: [Policy]?

        public init(policies: [Policy]? = nil) {
            self.policies = policies
        }

        private enum CodingKeys: String, CodingKey {
            case policies
        }
    }

    public struct ExponentialRolloutRate: AWSEncodableShape & AWSDecodableShape {
        /// The minimum number of things that will be notified of a pending job, per minute at the start of job rollout. This parameter allows you to define the initial rate of rollout.
        public let baseRatePerMinute: Int
        /// The exponential factor to increase the rate of rollout for a job. AWS IoT supports up to one digit after the decimal (for example, 1.5, but not 1.55).
        public let incrementFactor: Double
        /// The criteria to initiate the increase in rate of rollout for a job.
        public let rateIncreaseCriteria: RateIncreaseCriteria

        public init(baseRatePerMinute: Int, incrementFactor: Double, rateIncreaseCriteria: RateIncreaseCriteria) {
            self.baseRatePerMinute = baseRatePerMinute
            self.incrementFactor = incrementFactor
            self.rateIncreaseCriteria = rateIncreaseCriteria
        }

        public func validate(name: String) throws {
            try self.validate(self.baseRatePerMinute, name: "baseRatePerMinute", parent: name, max: 1000)
            try self.validate(self.baseRatePerMinute, name: "baseRatePerMinute", parent: name, min: 1)
            try self.validate(self.incrementFactor, name: "incrementFactor", parent: name, max: 5)
            try self.validate(self.incrementFactor, name: "incrementFactor", parent: name, min: 1)
            try self.rateIncreaseCriteria.validate(name: "\(name).rateIncreaseCriteria")
        }

        private enum CodingKeys: String, CodingKey {
            case baseRatePerMinute
            case incrementFactor
            case rateIncreaseCriteria
        }
    }

    public struct Field: AWSEncodableShape & AWSDecodableShape {
        /// The name of the field.
        public let name: String?
        /// The datatype of the field.
        public let type: FieldType?

        public init(name: String? = nil, type: FieldType? = nil) {
            self.name = name
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case name
            case type
        }
    }

    public struct FileLocation: AWSEncodableShape & AWSDecodableShape {
        /// The location of the updated firmware in S3.
        public let s3Location: S3Location?
        /// The stream that contains the OTA update.
        public let stream: Stream?

        public init(s3Location: S3Location? = nil, stream: Stream? = nil) {
            self.s3Location = s3Location
            self.stream = stream
        }

        public func validate(name: String) throws {
            try self.s3Location?.validate(name: "\(name).s3Location")
            try self.stream?.validate(name: "\(name).stream")
        }

        private enum CodingKeys: String, CodingKey {
            case s3Location
            case stream
        }
    }

    public struct FirehoseAction: AWSEncodableShape & AWSDecodableShape {
        /// Whether to deliver the Kinesis Data Firehose stream as a batch by using  PutRecordBatch . The default value is false. When batchMode is true and the rule's SQL statement evaluates to an Array, each Array element forms one record in the  PutRecordBatch  request. The resulting array can't have more than 500 records.
        public let batchMode: Bool?
        /// The delivery stream name.
        public let deliveryStreamName: String
        /// The IAM role that grants access to the Amazon Kinesis Firehose stream.
        public let roleArn: String
        /// A character separator that will be used to separate records written to the Firehose stream. Valid values are: '\n' (newline), '\t' (tab), '\r\n' (Windows newline), ',' (comma).
        public let separator: String?

        public init(batchMode: Bool? = nil, deliveryStreamName: String, roleArn: String, separator: String? = nil) {
            self.batchMode = batchMode
            self.deliveryStreamName = deliveryStreamName
            self.roleArn = roleArn
            self.separator = separator
        }

        public func validate(name: String) throws {
            try self.validate(self.separator, name: "separator", parent: name, pattern: "([\\n\\t])|(\\r\\n)|(,)")
        }

        private enum CodingKeys: String, CodingKey {
            case batchMode
            case deliveryStreamName
            case roleArn
            case separator
        }
    }

    public struct GetBehaviorModelTrainingSummariesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken")),
            AWSMemberEncoding(label: "securityProfileName", location: .querystring(locationName: "securityProfileName"))
        ]

        ///  The maximum number of results to return at one time. The default is 25.
        public let maxResults: Int?
        ///  The token for the next set of results.
        public let nextToken: String?
        ///  The name of the security profile.
        public let securityProfileName: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil, securityProfileName: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.securityProfileName = securityProfileName
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 10)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, max: 128)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, min: 1)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetBehaviorModelTrainingSummariesResponse: AWSDecodableShape {
        ///  A token that can be used to retrieve the next set of results, or null if there are no additional results.
        public let nextToken: String?
        ///  A list of all ML Detect behaviors and their model status for a given Security Profile.
        public let summaries: [BehaviorModelTrainingSummary]?

        public init(nextToken: String? = nil, summaries: [BehaviorModelTrainingSummary]? = nil) {
            self.nextToken = nextToken
            self.summaries = summaries
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case summaries
        }
    }

    public struct GetCardinalityRequest: AWSEncodableShape {
        /// The field to aggregate.
        public let aggregationField: String?
        /// The name of the index to search.
        public let indexName: String?
        /// The search query.
        public let queryString: String
        /// The query version.
        public let queryVersion: String?

        public init(aggregationField: String? = nil, indexName: String? = nil, queryString: String, queryVersion: String? = nil) {
            self.aggregationField = aggregationField
            self.indexName = indexName
            self.queryString = queryString
            self.queryVersion = queryVersion
        }

        public func validate(name: String) throws {
            try self.validate(self.aggregationField, name: "aggregationField", parent: name, min: 1)
            try self.validate(self.indexName, name: "indexName", parent: name, max: 128)
            try self.validate(self.indexName, name: "indexName", parent: name, min: 1)
            try self.validate(self.indexName, name: "indexName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
            try self.validate(self.queryString, name: "queryString", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case aggregationField
            case indexName
            case queryString
            case queryVersion
        }
    }

    public struct GetCardinalityResponse: AWSDecodableShape {
        /// The approximate count of unique values that match the query.
        public let cardinality: Int?

        public init(cardinality: Int? = nil) {
            self.cardinality = cardinality
        }

        private enum CodingKeys: String, CodingKey {
            case cardinality
        }
    }

    public struct GetEffectivePoliciesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "thingName", location: .querystring(locationName: "thingName"))
        ]

        /// The Cognito identity pool ID.
        public let cognitoIdentityPoolId: String?
        /// The principal. Valid principals are CertificateArn (arn:aws:iot:region:accountId:cert/certificateId), thingGroupArn (arn:aws:iot:region:accountId:thinggroup/groupName) and CognitoId (region:id).
        public let principal: String?
        /// The thing name.
        public let thingName: String?

        public init(cognitoIdentityPoolId: String? = nil, principal: String? = nil, thingName: String? = nil) {
            self.cognitoIdentityPoolId = cognitoIdentityPoolId
            self.principal = principal
            self.thingName = thingName
        }

        public func validate(name: String) throws {
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case cognitoIdentityPoolId
            case principal
        }
    }

    public struct GetEffectivePoliciesResponse: AWSDecodableShape {
        /// The effective policies.
        public let effectivePolicies: [EffectivePolicy]?

        public init(effectivePolicies: [EffectivePolicy]? = nil) {
            self.effectivePolicies = effectivePolicies
        }

        private enum CodingKeys: String, CodingKey {
            case effectivePolicies
        }
    }

    public struct GetIndexingConfigurationRequest: AWSEncodableShape {
        public init() {}
    }

    public struct GetIndexingConfigurationResponse: AWSDecodableShape {
        /// The index configuration.
        public let thingGroupIndexingConfiguration: ThingGroupIndexingConfiguration?
        /// Thing indexing configuration.
        public let thingIndexingConfiguration: ThingIndexingConfiguration?

        public init(thingGroupIndexingConfiguration: ThingGroupIndexingConfiguration? = nil, thingIndexingConfiguration: ThingIndexingConfiguration? = nil) {
            self.thingGroupIndexingConfiguration = thingGroupIndexingConfiguration
            self.thingIndexingConfiguration = thingIndexingConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case thingGroupIndexingConfiguration
            case thingIndexingConfiguration
        }
    }

    public struct GetJobDocumentRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "jobId", location: .uri(locationName: "jobId"))
        ]

        /// The unique identifier you assigned to this job when it was created.
        public let jobId: String

        public init(jobId: String) {
            self.jobId = jobId
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 64)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "[a-zA-Z0-9_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetJobDocumentResponse: AWSDecodableShape {
        /// The job document content.
        public let document: String?

        public init(document: String? = nil) {
            self.document = document
        }

        private enum CodingKeys: String, CodingKey {
            case document
        }
    }

    public struct GetLoggingOptionsRequest: AWSEncodableShape {
        public init() {}
    }

    public struct GetLoggingOptionsResponse: AWSDecodableShape {
        /// The logging level.
        public let logLevel: LogLevel?
        /// The ARN of the IAM role that grants access.
        public let roleArn: String?

        public init(logLevel: LogLevel? = nil, roleArn: String? = nil) {
            self.logLevel = logLevel
            self.roleArn = roleArn
        }

        private enum CodingKeys: String, CodingKey {
            case logLevel
            case roleArn
        }
    }

    public struct GetOTAUpdateRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "otaUpdateId", location: .uri(locationName: "otaUpdateId"))
        ]

        /// The OTA update ID.
        public let otaUpdateId: String

        public init(otaUpdateId: String) {
            self.otaUpdateId = otaUpdateId
        }

        public func validate(name: String) throws {
            try self.validate(self.otaUpdateId, name: "otaUpdateId", parent: name, max: 128)
            try self.validate(self.otaUpdateId, name: "otaUpdateId", parent: name, min: 1)
            try self.validate(self.otaUpdateId, name: "otaUpdateId", parent: name, pattern: "[a-zA-Z0-9_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetOTAUpdateResponse: AWSDecodableShape {
        /// The OTA update info.
        public let otaUpdateInfo: OTAUpdateInfo?

        public init(otaUpdateInfo: OTAUpdateInfo? = nil) {
            self.otaUpdateInfo = otaUpdateInfo
        }

        private enum CodingKeys: String, CodingKey {
            case otaUpdateInfo
        }
    }

    public struct GetPercentilesRequest: AWSEncodableShape {
        /// The field to aggregate.
        public let aggregationField: String?
        /// The name of the index to search.
        public let indexName: String?
        /// The percentile groups returned.
        public let percents: [Double]?
        /// The query string.
        public let queryString: String
        /// The query version.
        public let queryVersion: String?

        public init(aggregationField: String? = nil, indexName: String? = nil, percents: [Double]? = nil, queryString: String, queryVersion: String? = nil) {
            self.aggregationField = aggregationField
            self.indexName = indexName
            self.percents = percents
            self.queryString = queryString
            self.queryVersion = queryVersion
        }

        public func validate(name: String) throws {
            try self.validate(self.aggregationField, name: "aggregationField", parent: name, min: 1)
            try self.validate(self.indexName, name: "indexName", parent: name, max: 128)
            try self.validate(self.indexName, name: "indexName", parent: name, min: 1)
            try self.validate(self.indexName, name: "indexName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
            try self.percents?.forEach {
                try validate($0, name: "percents[]", parent: name, max: 100)
                try validate($0, name: "percents[]", parent: name, min: 0)
            }
            try self.validate(self.queryString, name: "queryString", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case aggregationField
            case indexName
            case percents
            case queryString
            case queryVersion
        }
    }

    public struct GetPercentilesResponse: AWSDecodableShape {
        /// The percentile values of the aggregated fields.
        public let percentiles: [PercentPair]?

        public init(percentiles: [PercentPair]? = nil) {
            self.percentiles = percentiles
        }

        private enum CodingKeys: String, CodingKey {
            case percentiles
        }
    }

    public struct GetPolicyRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "policyName", location: .uri(locationName: "policyName"))
        ]

        /// The name of the policy.
        public let policyName: String

        public init(policyName: String) {
            self.policyName = policyName
        }

        public func validate(name: String) throws {
            try self.validate(self.policyName, name: "policyName", parent: name, max: 128)
            try self.validate(self.policyName, name: "policyName", parent: name, min: 1)
            try self.validate(self.policyName, name: "policyName", parent: name, pattern: "[\\w+=,.@-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetPolicyResponse: AWSDecodableShape {
        /// The date the policy was created.
        public let creationDate: Date?
        /// The default policy version ID.
        public let defaultVersionId: String?
        /// The generation ID of the policy.
        public let generationId: String?
        /// The date the policy was last modified.
        public let lastModifiedDate: Date?
        /// The policy ARN.
        public let policyArn: String?
        /// The JSON document that describes the policy.
        public let policyDocument: String?
        /// The policy name.
        public let policyName: String?

        public init(creationDate: Date? = nil, defaultVersionId: String? = nil, generationId: String? = nil, lastModifiedDate: Date? = nil, policyArn: String? = nil, policyDocument: String? = nil, policyName: String? = nil) {
            self.creationDate = creationDate
            self.defaultVersionId = defaultVersionId
            self.generationId = generationId
            self.lastModifiedDate = lastModifiedDate
            self.policyArn = policyArn
            self.policyDocument = policyDocument
            self.policyName = policyName
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate
            case defaultVersionId
            case generationId
            case lastModifiedDate
            case policyArn
            case policyDocument
            case policyName
        }
    }

    public struct GetPolicyVersionRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "policyName", location: .uri(locationName: "policyName")),
            AWSMemberEncoding(label: "policyVersionId", location: .uri(locationName: "policyVersionId"))
        ]

        /// The name of the policy.
        public let policyName: String
        /// The policy version ID.
        public let policyVersionId: String

        public init(policyName: String, policyVersionId: String) {
            self.policyName = policyName
            self.policyVersionId = policyVersionId
        }

        public func validate(name: String) throws {
            try self.validate(self.policyName, name: "policyName", parent: name, max: 128)
            try self.validate(self.policyName, name: "policyName", parent: name, min: 1)
            try self.validate(self.policyName, name: "policyName", parent: name, pattern: "[\\w+=,.@-]+")
            try self.validate(self.policyVersionId, name: "policyVersionId", parent: name, pattern: "[0-9]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetPolicyVersionResponse: AWSDecodableShape {
        /// The date the policy was created.
        public let creationDate: Date?
        /// The generation ID of the policy version.
        public let generationId: String?
        /// Specifies whether the policy version is the default.
        public let isDefaultVersion: Bool?
        /// The date the policy was last modified.
        public let lastModifiedDate: Date?
        /// The policy ARN.
        public let policyArn: String?
        /// The JSON document that describes the policy.
        public let policyDocument: String?
        /// The policy name.
        public let policyName: String?
        /// The policy version ID.
        public let policyVersionId: String?

        public init(creationDate: Date? = nil, generationId: String? = nil, isDefaultVersion: Bool? = nil, lastModifiedDate: Date? = nil, policyArn: String? = nil, policyDocument: String? = nil, policyName: String? = nil, policyVersionId: String? = nil) {
            self.creationDate = creationDate
            self.generationId = generationId
            self.isDefaultVersion = isDefaultVersion
            self.lastModifiedDate = lastModifiedDate
            self.policyArn = policyArn
            self.policyDocument = policyDocument
            self.policyName = policyName
            self.policyVersionId = policyVersionId
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate
            case generationId
            case isDefaultVersion
            case lastModifiedDate
            case policyArn
            case policyDocument
            case policyName
            case policyVersionId
        }
    }

    public struct GetRegistrationCodeRequest: AWSEncodableShape {
        public init() {}
    }

    public struct GetRegistrationCodeResponse: AWSDecodableShape {
        /// The CA certificate registration code.
        public let registrationCode: String?

        public init(registrationCode: String? = nil) {
            self.registrationCode = registrationCode
        }

        private enum CodingKeys: String, CodingKey {
            case registrationCode
        }
    }

    public struct GetStatisticsRequest: AWSEncodableShape {
        /// The aggregation field name.
        public let aggregationField: String?
        /// The name of the index to search. The default value is AWS_Things.
        public let indexName: String?
        /// The query used to search. You can specify "*" for the query string to get the count of all indexed things in your AWS account.
        public let queryString: String
        /// The version of the query used to search.
        public let queryVersion: String?

        public init(aggregationField: String? = nil, indexName: String? = nil, queryString: String, queryVersion: String? = nil) {
            self.aggregationField = aggregationField
            self.indexName = indexName
            self.queryString = queryString
            self.queryVersion = queryVersion
        }

        public func validate(name: String) throws {
            try self.validate(self.aggregationField, name: "aggregationField", parent: name, min: 1)
            try self.validate(self.indexName, name: "indexName", parent: name, max: 128)
            try self.validate(self.indexName, name: "indexName", parent: name, min: 1)
            try self.validate(self.indexName, name: "indexName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
            try self.validate(self.queryString, name: "queryString", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case aggregationField
            case indexName
            case queryString
            case queryVersion
        }
    }

    public struct GetStatisticsResponse: AWSDecodableShape {
        /// The statistics returned by the Fleet Indexing service based on the query and aggregation field.
        public let statistics: Statistics?

        public init(statistics: Statistics? = nil) {
            self.statistics = statistics
        }

        private enum CodingKeys: String, CodingKey {
            case statistics
        }
    }

    public struct GetTopicRuleDestinationRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "arn", location: .uri(locationName: "arn"))
        ]

        /// The ARN of the topic rule destination.
        public let arn: String

        public init(arn: String) {
            self.arn = arn
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetTopicRuleDestinationResponse: AWSDecodableShape {
        /// The topic rule destination.
        public let topicRuleDestination: TopicRuleDestination?

        public init(topicRuleDestination: TopicRuleDestination? = nil) {
            self.topicRuleDestination = topicRuleDestination
        }

        private enum CodingKeys: String, CodingKey {
            case topicRuleDestination
        }
    }

    public struct GetTopicRuleRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "ruleName", location: .uri(locationName: "ruleName"))
        ]

        /// The name of the rule.
        public let ruleName: String

        public init(ruleName: String) {
            self.ruleName = ruleName
        }

        public func validate(name: String) throws {
            try self.validate(self.ruleName, name: "ruleName", parent: name, max: 128)
            try self.validate(self.ruleName, name: "ruleName", parent: name, min: 1)
            try self.validate(self.ruleName, name: "ruleName", parent: name, pattern: "^[a-zA-Z0-9_]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct GetTopicRuleResponse: AWSDecodableShape {
        /// The rule.
        public let rule: TopicRule?
        /// The rule ARN.
        public let ruleArn: String?

        public init(rule: TopicRule? = nil, ruleArn: String? = nil) {
            self.rule = rule
            self.ruleArn = ruleArn
        }

        private enum CodingKeys: String, CodingKey {
            case rule
            case ruleArn
        }
    }

    public struct GetV2LoggingOptionsRequest: AWSEncodableShape {
        public init() {}
    }

    public struct GetV2LoggingOptionsResponse: AWSDecodableShape {
        /// The default log level.
        public let defaultLogLevel: LogLevel?
        /// Disables all logs.
        public let disableAllLogs: Bool?
        /// The IAM role ARN AWS IoT uses to write to your CloudWatch logs.
        public let roleArn: String?

        public init(defaultLogLevel: LogLevel? = nil, disableAllLogs: Bool? = nil, roleArn: String? = nil) {
            self.defaultLogLevel = defaultLogLevel
            self.disableAllLogs = disableAllLogs
            self.roleArn = roleArn
        }

        private enum CodingKeys: String, CodingKey {
            case defaultLogLevel
            case disableAllLogs
            case roleArn
        }
    }

    public struct GroupNameAndArn: AWSDecodableShape {
        /// The group ARN.
        public let groupArn: String?
        /// The group name.
        public let groupName: String?

        public init(groupArn: String? = nil, groupName: String? = nil) {
            self.groupArn = groupArn
            self.groupName = groupName
        }

        private enum CodingKeys: String, CodingKey {
            case groupArn
            case groupName
        }
    }

    public struct HttpAction: AWSEncodableShape & AWSDecodableShape {
        /// The authentication method to use when sending data to an HTTPS endpoint.
        public let auth: HttpAuthorization?
        /// The URL to which AWS IoT sends a confirmation message. The value of the confirmation URL must be a prefix of the endpoint URL. If you do not specify a confirmation URL AWS IoT uses the endpoint URL as the confirmation URL. If you use substitution templates in the confirmationUrl, you must create and enable topic rule destinations that match each possible value of the substitution template before traffic is allowed to your endpoint URL.
        public let confirmationUrl: String?
        /// The HTTP headers to send with the message data.
        public let headers: [HttpActionHeader]?
        /// The endpoint URL. If substitution templates are used in the URL, you must also specify a confirmationUrl. If this is a new destination, a new TopicRuleDestination is created if possible.
        public let url: String

        public init(auth: HttpAuthorization? = nil, confirmationUrl: String? = nil, headers: [HttpActionHeader]? = nil, url: String) {
            self.auth = auth
            self.confirmationUrl = confirmationUrl
            self.headers = headers
            self.url = url
        }

        public func validate(name: String) throws {
            try self.validate(self.confirmationUrl, name: "confirmationUrl", parent: name, max: 2000)
            try self.headers?.forEach {
                try $0.validate(name: "\(name).headers[]")
            }
            try self.validate(self.headers, name: "headers", parent: name, max: 100)
            try self.validate(self.headers, name: "headers", parent: name, min: 0)
            try self.validate(self.url, name: "url", parent: name, max: 2000)
        }

        private enum CodingKeys: String, CodingKey {
            case auth
            case confirmationUrl
            case headers
            case url
        }
    }

    public struct HttpActionHeader: AWSEncodableShape & AWSDecodableShape {
        /// The HTTP header key.
        public let key: String
        /// The HTTP header value. Substitution templates are supported.
        public let value: String

        public init(key: String, value: String) {
            self.key = key
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 256)
            try self.validate(self.key, name: "key", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case key
            case value
        }
    }

    public struct HttpAuthorization: AWSEncodableShape & AWSDecodableShape {
        /// Use Sig V4 authorization. For more information, see Signature Version 4 Signing Process.
        public let sigv4: SigV4Authorization?

        public init(sigv4: SigV4Authorization? = nil) {
            self.sigv4 = sigv4
        }

        private enum CodingKeys: String, CodingKey {
            case sigv4
        }
    }

    public struct HttpContext: AWSEncodableShape {
        /// The header keys and values in an HTTP authorization request.
        public let headers: [String: String]?
        /// The query string keys and values in an HTTP authorization request.
        public let queryString: String?

        public init(headers: [String: String]? = nil, queryString: String? = nil) {
            self.headers = headers
            self.queryString = queryString
        }

        public func validate(name: String) throws {
            try self.headers?.forEach {
                try validate($0.key, name: "headers.key", parent: name, max: 8192)
                try validate($0.key, name: "headers.key", parent: name, min: 1)
                try validate($0.value, name: "headers[\"\($0.key)\"]", parent: name, max: 8192)
                try validate($0.value, name: "headers[\"\($0.key)\"]", parent: name, min: 1)
            }
            try self.validate(self.queryString, name: "queryString", parent: name, max: 4096)
            try self.validate(self.queryString, name: "queryString", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case headers
            case queryString
        }
    }

    public struct HttpUrlDestinationConfiguration: AWSEncodableShape {
        /// The URL AWS IoT uses to confirm ownership of or access to the topic rule destination URL.
        public let confirmationUrl: String

        public init(confirmationUrl: String) {
            self.confirmationUrl = confirmationUrl
        }

        public func validate(name: String) throws {
            try self.validate(self.confirmationUrl, name: "confirmationUrl", parent: name, max: 2000)
        }

        private enum CodingKeys: String, CodingKey {
            case confirmationUrl
        }
    }

    public struct HttpUrlDestinationProperties: AWSDecodableShape {
        /// The URL used to confirm the HTTP topic rule destination URL.
        public let confirmationUrl: String?

        public init(confirmationUrl: String? = nil) {
            self.confirmationUrl = confirmationUrl
        }

        private enum CodingKeys: String, CodingKey {
            case confirmationUrl
        }
    }

    public struct HttpUrlDestinationSummary: AWSDecodableShape {
        /// The URL used to confirm ownership of or access to the HTTP topic rule destination URL.
        public let confirmationUrl: String?

        public init(confirmationUrl: String? = nil) {
            self.confirmationUrl = confirmationUrl
        }

        private enum CodingKeys: String, CodingKey {
            case confirmationUrl
        }
    }

    public struct ImplicitDeny: AWSDecodableShape {
        /// Policies that don't contain a matching allow or deny statement for the specified action on the specified resource.
        public let policies: [Policy]?

        public init(policies: [Policy]? = nil) {
            self.policies = policies
        }

        private enum CodingKeys: String, CodingKey {
            case policies
        }
    }

    public struct IotAnalyticsAction: AWSEncodableShape & AWSDecodableShape {
        /// Whether to process the action as a batch. The default value is false. When batchMode is true and the rule SQL statement evaluates to an Array, each Array element is delivered as a separate message when passed by  BatchPutMessage  to the AWS IoT Analytics channel. The resulting array can't have more than 100 messages.
        public let batchMode: Bool?
        /// (deprecated) The ARN of the IoT Analytics channel to which message data will be sent.
        public let channelArn: String?
        /// The name of the IoT Analytics channel to which message data will be sent.
        public let channelName: String?
        /// The ARN of the role which has a policy that grants IoT Analytics permission to send message data via IoT Analytics (iotanalytics:BatchPutMessage).
        public let roleArn: String?

        public init(batchMode: Bool? = nil, channelArn: String? = nil, channelName: String? = nil, roleArn: String? = nil) {
            self.batchMode = batchMode
            self.channelArn = channelArn
            self.channelName = channelName
            self.roleArn = roleArn
        }

        private enum CodingKeys: String, CodingKey {
            case batchMode
            case channelArn
            case channelName
            case roleArn
        }
    }

    public struct IotEventsAction: AWSEncodableShape & AWSDecodableShape {
        /// Whether to process the event actions as a batch. The default value is false. When batchMode is true, you can't specify a messageId.  When batchMode is true and the rule SQL statement evaluates to an Array, each Array element is treated as a separate message when it's sent to AWS IoT Events by calling  BatchPutMessage . The resulting array can't have more than 10 messages.
        public let batchMode: Bool?
        /// The name of the AWS IoT Events input.
        public let inputName: String
        /// The ID of the message. The default messageId is a new UUID value. When batchMode is true, you can't specify a messageId--a new UUID value will be assigned. Assign a value to this property to ensure that only one input (message) with a given messageId will be processed by an AWS IoT Events detector.
        public let messageId: String?
        /// The ARN of the role that grants AWS IoT permission to send an input to an AWS IoT Events detector. ("Action":"iotevents:BatchPutMessage").
        public let roleArn: String

        public init(batchMode: Bool? = nil, inputName: String, messageId: String? = nil, roleArn: String) {
            self.batchMode = batchMode
            self.inputName = inputName
            self.messageId = messageId
            self.roleArn = roleArn
        }

        public func validate(name: String) throws {
            try self.validate(self.inputName, name: "inputName", parent: name, max: 128)
            try self.validate(self.inputName, name: "inputName", parent: name, min: 1)
            try self.validate(self.messageId, name: "messageId", parent: name, max: 128)
        }

        private enum CodingKeys: String, CodingKey {
            case batchMode
            case inputName
            case messageId
            case roleArn
        }
    }

    public struct IotSiteWiseAction: AWSEncodableShape & AWSDecodableShape {
        /// A list of asset property value entries.
        public let putAssetPropertyValueEntries: [PutAssetPropertyValueEntry]
        /// The ARN of the role that grants AWS IoT permission to send an asset property value to AWS IoTSiteWise. ("Action": "iotsitewise:BatchPutAssetPropertyValue"). The trust policy can restrict access to specific asset hierarchy paths.
        public let roleArn: String

        public init(putAssetPropertyValueEntries: [PutAssetPropertyValueEntry], roleArn: String) {
            self.putAssetPropertyValueEntries = putAssetPropertyValueEntries
            self.roleArn = roleArn
        }

        public func validate(name: String) throws {
            try self.putAssetPropertyValueEntries.forEach {
                try $0.validate(name: "\(name).putAssetPropertyValueEntries[]")
            }
            try self.validate(self.putAssetPropertyValueEntries, name: "putAssetPropertyValueEntries", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case putAssetPropertyValueEntries
            case roleArn
        }
    }

    public struct Job: AWSDecodableShape {
        /// Configuration for criteria to abort the job.
        public let abortConfig: AbortConfig?
        /// If the job was updated, describes the reason for the update.
        public let comment: String?
        /// The time, in seconds since the epoch, when the job was completed.
        public let completedAt: Date?
        /// The time, in seconds since the epoch, when the job was created.
        public let createdAt: Date?
        /// A short text description of the job.
        public let description: String?
        /// Will be true if the job was canceled with the optional force parameter set to true.
        public let forceCanceled: Bool?
        /// An ARN identifying the job with format "arn:aws:iot:region:account:job/jobId".
        public let jobArn: String?
        /// Allows you to create a staged rollout of a job.
        public let jobExecutionsRolloutConfig: JobExecutionsRolloutConfig?
        /// The unique identifier you assigned to this job when it was created.
        public let jobId: String?
        /// Details about the job process.
        public let jobProcessDetails: JobProcessDetails?
        /// The time, in seconds since the epoch, when the job was last updated.
        public let lastUpdatedAt: Date?
        /// The namespace used to indicate that a job is a customer-managed job. When you specify a value for this parameter, AWS IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.  $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/   The namespaceId feature is in public preview.
        public let namespaceId: String?
        /// Configuration for pre-signed S3 URLs.
        public let presignedUrlConfig: PresignedUrlConfig?
        /// If the job was updated, provides the reason code for the update.
        public let reasonCode: String?
        /// The status of the job, one of IN_PROGRESS, CANCELED, DELETION_IN_PROGRESS or COMPLETED.
        public let status: JobStatus?
        /// A list of IoT things and thing groups to which the job should be sent.
        public let targets: [String]?
        /// Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing when a change is detected in a target. For example, a job will run on a device when the thing representing the device is added to a target group, even after the job was completed by all things originally in the group.
        public let targetSelection: TargetSelection?
        /// Specifies the amount of time each device has to finish its execution of the job. A timer is started when the job execution status is set to IN_PROGRESS. If the job execution status is not set to another terminal state before the timer expires, it will be automatically set to TIMED_OUT.
        public let timeoutConfig: TimeoutConfig?

        public init(abortConfig: AbortConfig? = nil, comment: String? = nil, completedAt: Date? = nil, createdAt: Date? = nil, description: String? = nil, forceCanceled: Bool? = nil, jobArn: String? = nil, jobExecutionsRolloutConfig: JobExecutionsRolloutConfig? = nil, jobId: String? = nil, jobProcessDetails: JobProcessDetails? = nil, lastUpdatedAt: Date? = nil, namespaceId: String? = nil, presignedUrlConfig: PresignedUrlConfig? = nil, reasonCode: String? = nil, status: JobStatus? = nil, targets: [String]? = nil, targetSelection: TargetSelection? = nil, timeoutConfig: TimeoutConfig? = nil) {
            self.abortConfig = abortConfig
            self.comment = comment
            self.completedAt = completedAt
            self.createdAt = createdAt
            self.description = description
            self.forceCanceled = forceCanceled
            self.jobArn = jobArn
            self.jobExecutionsRolloutConfig = jobExecutionsRolloutConfig
            self.jobId = jobId
            self.jobProcessDetails = jobProcessDetails
            self.lastUpdatedAt = lastUpdatedAt
            self.namespaceId = namespaceId
            self.presignedUrlConfig = presignedUrlConfig
            self.reasonCode = reasonCode
            self.status = status
            self.targets = targets
            self.targetSelection = targetSelection
            self.timeoutConfig = timeoutConfig
        }

        private enum CodingKeys: String, CodingKey {
            case abortConfig
            case comment
            case completedAt
            case createdAt
            case description
            case forceCanceled
            case jobArn
            case jobExecutionsRolloutConfig
            case jobId
            case jobProcessDetails
            case lastUpdatedAt
            case namespaceId
            case presignedUrlConfig
            case reasonCode
            case status
            case targets
            case targetSelection
            case timeoutConfig
        }
    }

    public struct JobExecution: AWSDecodableShape {
        /// The estimated number of seconds that remain before the job execution status will be changed to TIMED_OUT. The timeout interval can be anywhere between 1 minute and 7 days (1 to 10080 minutes). The actual job execution timeout can occur up to 60 seconds later than the estimated duration. This value will not be included if the job execution has reached a terminal status.
        public let approximateSecondsBeforeTimedOut: Int64?
        /// A string (consisting of the digits "0" through "9") which identifies this particular job execution on this particular device. It can be used in commands which return or update job execution information.
        public let executionNumber: Int64?
        /// Will be true if the job execution was canceled with the optional force parameter set to true.
        public let forceCanceled: Bool?
        /// The unique identifier you assigned to the job when it was created.
        public let jobId: String?
        /// The time, in seconds since the epoch, when the job execution was last updated.
        public let lastUpdatedAt: Date?
        /// The time, in seconds since the epoch, when the job execution was queued.
        public let queuedAt: Date?
        /// The time, in seconds since the epoch, when the job execution started.
        public let startedAt: Date?
        /// The status of the job execution (IN_PROGRESS, QUEUED, FAILED, SUCCEEDED, TIMED_OUT, CANCELED, or REJECTED).
        public let status: JobExecutionStatus?
        /// A collection of name/value pairs that describe the status of the job execution.
        public let statusDetails: JobExecutionStatusDetails?
        /// The ARN of the thing on which the job execution is running.
        public let thingArn: String?
        /// The version of the job execution. Job execution versions are incremented each time they are updated by a device.
        public let versionNumber: Int64?

        public init(approximateSecondsBeforeTimedOut: Int64? = nil, executionNumber: Int64? = nil, forceCanceled: Bool? = nil, jobId: String? = nil, lastUpdatedAt: Date? = nil, queuedAt: Date? = nil, startedAt: Date? = nil, status: JobExecutionStatus? = nil, statusDetails: JobExecutionStatusDetails? = nil, thingArn: String? = nil, versionNumber: Int64? = nil) {
            self.approximateSecondsBeforeTimedOut = approximateSecondsBeforeTimedOut
            self.executionNumber = executionNumber
            self.forceCanceled = forceCanceled
            self.jobId = jobId
            self.lastUpdatedAt = lastUpdatedAt
            self.queuedAt = queuedAt
            self.startedAt = startedAt
            self.status = status
            self.statusDetails = statusDetails
            self.thingArn = thingArn
            self.versionNumber = versionNumber
        }

        private enum CodingKeys: String, CodingKey {
            case approximateSecondsBeforeTimedOut
            case executionNumber
            case forceCanceled
            case jobId
            case lastUpdatedAt
            case queuedAt
            case startedAt
            case status
            case statusDetails
            case thingArn
            case versionNumber
        }
    }

    public struct JobExecutionStatusDetails: AWSDecodableShape {
        /// The job execution status.
        public let detailsMap: [String: String]?

        public init(detailsMap: [String: String]? = nil) {
            self.detailsMap = detailsMap
        }

        private enum CodingKeys: String, CodingKey {
            case detailsMap
        }
    }

    public struct JobExecutionSummary: AWSDecodableShape {
        /// A string (consisting of the digits "0" through "9") which identifies this particular job execution on this particular device. It can be used later in commands which return or update job execution information.
        public let executionNumber: Int64?
        /// The time, in seconds since the epoch, when the job execution was last updated.
        public let lastUpdatedAt: Date?
        /// The time, in seconds since the epoch, when the job execution was queued.
        public let queuedAt: Date?
        /// The time, in seconds since the epoch, when the job execution started.
        public let startedAt: Date?
        /// The status of the job execution.
        public let status: JobExecutionStatus?

        public init(executionNumber: Int64? = nil, lastUpdatedAt: Date? = nil, queuedAt: Date? = nil, startedAt: Date? = nil, status: JobExecutionStatus? = nil) {
            self.executionNumber = executionNumber
            self.lastUpdatedAt = lastUpdatedAt
            self.queuedAt = queuedAt
            self.startedAt = startedAt
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case executionNumber
            case lastUpdatedAt
            case queuedAt
            case startedAt
            case status
        }
    }

    public struct JobExecutionSummaryForJob: AWSDecodableShape {
        /// Contains a subset of information about a job execution.
        public let jobExecutionSummary: JobExecutionSummary?
        /// The ARN of the thing on which the job execution is running.
        public let thingArn: String?

        public init(jobExecutionSummary: JobExecutionSummary? = nil, thingArn: String? = nil) {
            self.jobExecutionSummary = jobExecutionSummary
            self.thingArn = thingArn
        }

        private enum CodingKeys: String, CodingKey {
            case jobExecutionSummary
            case thingArn
        }
    }

    public struct JobExecutionSummaryForThing: AWSDecodableShape {
        /// Contains a subset of information about a job execution.
        public let jobExecutionSummary: JobExecutionSummary?
        /// The unique identifier you assigned to this job when it was created.
        public let jobId: String?

        public init(jobExecutionSummary: JobExecutionSummary? = nil, jobId: String? = nil) {
            self.jobExecutionSummary = jobExecutionSummary
            self.jobId = jobId
        }

        private enum CodingKeys: String, CodingKey {
            case jobExecutionSummary
            case jobId
        }
    }

    public struct JobExecutionsRolloutConfig: AWSEncodableShape & AWSDecodableShape {
        /// The rate of increase for a job rollout. This parameter allows you to define an exponential rate for a job rollout.
        public let exponentialRate: ExponentialRolloutRate?
        /// The maximum number of things that will be notified of a pending job, per minute. This parameter allows you to create a staged rollout.
        public let maximumPerMinute: Int?

        public init(exponentialRate: ExponentialRolloutRate? = nil, maximumPerMinute: Int? = nil) {
            self.exponentialRate = exponentialRate
            self.maximumPerMinute = maximumPerMinute
        }

        public func validate(name: String) throws {
            try self.exponentialRate?.validate(name: "\(name).exponentialRate")
            try self.validate(self.maximumPerMinute, name: "maximumPerMinute", parent: name, max: 1000)
            try self.validate(self.maximumPerMinute, name: "maximumPerMinute", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case exponentialRate
            case maximumPerMinute
        }
    }

    public struct JobProcessDetails: AWSDecodableShape {
        /// The number of things that cancelled the job.
        public let numberOfCanceledThings: Int?
        /// The number of things that failed executing the job.
        public let numberOfFailedThings: Int?
        /// The number of things currently executing the job.
        public let numberOfInProgressThings: Int?
        /// The number of things that are awaiting execution of the job.
        public let numberOfQueuedThings: Int?
        /// The number of things that rejected the job.
        public let numberOfRejectedThings: Int?
        /// The number of things that are no longer scheduled to execute the job because they have been deleted or have been removed from the group that was a target of the job.
        public let numberOfRemovedThings: Int?
        /// The number of things which successfully completed the job.
        public let numberOfSucceededThings: Int?
        /// The number of things whose job execution status is TIMED_OUT.
        public let numberOfTimedOutThings: Int?
        /// The target devices to which the job execution is being rolled out. This value will be null after the job execution has finished rolling out to all the target devices.
        public let processingTargets: [String]?

        public init(numberOfCanceledThings: Int? = nil, numberOfFailedThings: Int? = nil, numberOfInProgressThings: Int? = nil, numberOfQueuedThings: Int? = nil, numberOfRejectedThings: Int? = nil, numberOfRemovedThings: Int? = nil, numberOfSucceededThings: Int? = nil, numberOfTimedOutThings: Int? = nil, processingTargets: [String]? = nil) {
            self.numberOfCanceledThings = numberOfCanceledThings
            self.numberOfFailedThings = numberOfFailedThings
            self.numberOfInProgressThings = numberOfInProgressThings
            self.numberOfQueuedThings = numberOfQueuedThings
            self.numberOfRejectedThings = numberOfRejectedThings
            self.numberOfRemovedThings = numberOfRemovedThings
            self.numberOfSucceededThings = numberOfSucceededThings
            self.numberOfTimedOutThings = numberOfTimedOutThings
            self.processingTargets = processingTargets
        }

        private enum CodingKeys: String, CodingKey {
            case numberOfCanceledThings
            case numberOfFailedThings
            case numberOfInProgressThings
            case numberOfQueuedThings
            case numberOfRejectedThings
            case numberOfRemovedThings
            case numberOfSucceededThings
            case numberOfTimedOutThings
            case processingTargets
        }
    }

    public struct JobSummary: AWSDecodableShape {
        /// The time, in seconds since the epoch, when the job completed.
        public let completedAt: Date?
        /// The time, in seconds since the epoch, when the job was created.
        public let createdAt: Date?
        /// The job ARN.
        public let jobArn: String?
        /// The unique identifier you assigned to this job when it was created.
        public let jobId: String?
        /// The time, in seconds since the epoch, when the job was last updated.
        public let lastUpdatedAt: Date?
        /// The job summary status.
        public let status: JobStatus?
        /// Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing when a change is detected in a target. For example, a job will run on a thing when the thing is added to a target group, even after the job was completed by all things originally in the group.
        public let targetSelection: TargetSelection?
        /// The ID of the thing group.
        public let thingGroupId: String?

        public init(completedAt: Date? = nil, createdAt: Date? = nil, jobArn: String? = nil, jobId: String? = nil, lastUpdatedAt: Date? = nil, status: JobStatus? = nil, targetSelection: TargetSelection? = nil, thingGroupId: String? = nil) {
            self.completedAt = completedAt
            self.createdAt = createdAt
            self.jobArn = jobArn
            self.jobId = jobId
            self.lastUpdatedAt = lastUpdatedAt
            self.status = status
            self.targetSelection = targetSelection
            self.thingGroupId = thingGroupId
        }

        private enum CodingKeys: String, CodingKey {
            case completedAt
            case createdAt
            case jobArn
            case jobId
            case lastUpdatedAt
            case status
            case targetSelection
            case thingGroupId
        }
    }

    public struct KafkaAction: AWSEncodableShape & AWSDecodableShape {
        /// Properties of the Apache Kafka producer client.
        public let clientProperties: [String: String]
        /// The ARN of Kafka action's VPC TopicRuleDestination.
        public let destinationArn: String
        /// The Kafka message key.
        public let key: String?
        /// The Kafka message partition.
        public let partition: String?
        /// The Kafka topic for messages to be sent to the Kafka broker.
        public let topic: String

        public init(clientProperties: [String: String], destinationArn: String, key: String? = nil, partition: String? = nil, topic: String) {
            self.clientProperties = clientProperties
            self.destinationArn = destinationArn
            self.key = key
            self.partition = partition
            self.topic = topic
        }

        private enum CodingKeys: String, CodingKey {
            case clientProperties
            case destinationArn
            case key
            case partition
            case topic
        }
    }

    public struct KeyPair: AWSDecodableShape {
        /// The private key.
        public let privateKey: String?
        /// The public key.
        public let publicKey: String?

        public init(privateKey: String? = nil, publicKey: String? = nil) {
            self.privateKey = privateKey
            self.publicKey = publicKey
        }

        private enum CodingKeys: String, CodingKey {
            case privateKey = "PrivateKey"
            case publicKey = "PublicKey"
        }
    }

    public struct KinesisAction: AWSEncodableShape & AWSDecodableShape {
        /// The partition key.
        public let partitionKey: String?
        /// The ARN of the IAM role that grants access to the Amazon Kinesis stream.
        public let roleArn: String
        /// The name of the Amazon Kinesis stream.
        public let streamName: String

        public init(partitionKey: String? = nil, roleArn: String, streamName: String) {
            self.partitionKey = partitionKey
            self.roleArn = roleArn
            self.streamName = streamName
        }

        private enum CodingKeys: String, CodingKey {
            case partitionKey
            case roleArn
            case streamName
        }
    }

    public struct LambdaAction: AWSEncodableShape & AWSDecodableShape {
        /// The ARN of the Lambda function.
        public let functionArn: String

        public init(functionArn: String) {
            self.functionArn = functionArn
        }

        private enum CodingKeys: String, CodingKey {
            case functionArn
        }
    }

    public struct ListActiveViolationsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "behaviorCriteriaType", location: .querystring(locationName: "behaviorCriteriaType")),
            AWSMemberEncoding(label: "listSuppressedAlerts", location: .querystring(locationName: "listSuppressedAlerts")),
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken")),
            AWSMemberEncoding(label: "securityProfileName", location: .querystring(locationName: "securityProfileName")),
            AWSMemberEncoding(label: "thingName", location: .querystring(locationName: "thingName"))
        ]

        ///  The criteria for a behavior.
        public let behaviorCriteriaType: BehaviorCriteriaType?
        ///  A list of all suppressed alerts.
        public let listSuppressedAlerts: Bool?
        /// The maximum number of results to return at one time.
        public let maxResults: Int?
        /// The token for the next set of results.
        public let nextToken: String?
        /// The name of the Device Defender security profile for which violations are listed.
        public let securityProfileName: String?
        /// The name of the thing whose active violations are listed.
        public let thingName: String?

        public init(behaviorCriteriaType: BehaviorCriteriaType? = nil, listSuppressedAlerts: Bool? = nil, maxResults: Int? = nil, nextToken: String? = nil, securityProfileName: String? = nil, thingName: String? = nil) {
            self.behaviorCriteriaType = behaviorCriteriaType
            self.listSuppressedAlerts = listSuppressedAlerts
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.securityProfileName = securityProfileName
            self.thingName = thingName
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, max: 128)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, min: 1)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListActiveViolationsResponse: AWSDecodableShape {
        /// The list of active violations.
        public let activeViolations: [ActiveViolation]?
        /// A token that can be used to retrieve the next set of results, or null if there are no additional results.
        public let nextToken: String?

        public init(activeViolations: [ActiveViolation]? = nil, nextToken: String? = nil) {
            self.activeViolations = activeViolations
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case activeViolations
            case nextToken
        }
    }

    public struct ListAttachedPoliciesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "marker", location: .querystring(locationName: "marker")),
            AWSMemberEncoding(label: "pageSize", location: .querystring(locationName: "pageSize")),
            AWSMemberEncoding(label: "recursive", location: .querystring(locationName: "recursive")),
            AWSMemberEncoding(label: "target", location: .uri(locationName: "target"))
        ]

        /// The token to retrieve the next set of results.
        public let marker: String?
        /// The maximum number of results to be returned per request.
        public let pageSize: Int?
        /// When true, recursively list attached policies.
        public let recursive: Bool?
        /// The group or principal for which the policies will be listed. Valid principals are CertificateArn (arn:aws:iot:region:accountId:cert/certificateId), thingGroupArn (arn:aws:iot:region:accountId:thinggroup/groupName) and CognitoId (region:id).
        public let target: String

        public init(marker: String? = nil, pageSize: Int? = nil, recursive: Bool? = nil, target: String) {
            self.marker = marker
            self.pageSize = pageSize
            self.recursive = recursive
            self.target = target
        }

        public func validate(name: String) throws {
            try self.validate(self.marker, name: "marker", parent: name, max: 1024)
            try self.validate(self.marker, name: "marker", parent: name, pattern: "[A-Za-z0-9+/]+={0,2}")
            try self.validate(self.pageSize, name: "pageSize", parent: name, max: 250)
            try self.validate(self.pageSize, name: "pageSize", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListAttachedPoliciesResponse: AWSDecodableShape {
        /// The token to retrieve the next set of results, or ``null`` if there are no more results.
        public let nextMarker: String?
        /// The policies.
        public let policies: [Policy]?

        public init(nextMarker: String? = nil, policies: [Policy]? = nil) {
            self.nextMarker = nextMarker
            self.policies = policies
        }

        private enum CodingKeys: String, CodingKey {
            case nextMarker
            case policies
        }
    }

    public struct ListAuditFindingsRequest: AWSEncodableShape {
        /// A filter to limit results to the findings for the specified audit check.
        public let checkName: String?
        /// A filter to limit results to those found before the specified time. You must specify either the startTime and endTime or the taskId, but not both.
        public let endTime: Date?
        ///  Boolean flag indicating whether only the suppressed findings or the unsuppressed findings should be listed. If this parameter isn't provided, the response will list both suppressed and unsuppressed findings.
        public let listSuppressedFindings: Bool?
        /// The maximum number of results to return at one time. The default is 25.
        public let maxResults: Int?
        /// The token for the next set of results.
        public let nextToken: String?
        /// Information identifying the noncompliant resource.
        public let resourceIdentifier: ResourceIdentifier?
        /// A filter to limit results to those found after the specified time. You must specify either the startTime and endTime or the taskId, but not both.
        public let startTime: Date?
        /// A filter to limit results to the audit with the specified ID. You must specify either the taskId or the startTime and endTime, but not both.
        public let taskId: String?

        public init(checkName: String? = nil, endTime: Date? = nil, listSuppressedFindings: Bool? = nil, maxResults: Int? = nil, nextToken: String? = nil, resourceIdentifier: ResourceIdentifier? = nil, startTime: Date? = nil, taskId: String? = nil) {
            self.checkName = checkName
            self.endTime = endTime
            self.listSuppressedFindings = listSuppressedFindings
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.resourceIdentifier = resourceIdentifier
            self.startTime = startTime
            self.taskId = taskId
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.resourceIdentifier?.validate(name: "\(name).resourceIdentifier")
            try self.validate(self.taskId, name: "taskId", parent: name, max: 40)
            try self.validate(self.taskId, name: "taskId", parent: name, min: 1)
            try self.validate(self.taskId, name: "taskId", parent: name, pattern: "[a-zA-Z0-9\\-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case checkName
            case endTime
            case listSuppressedFindings
            case maxResults
            case nextToken
            case resourceIdentifier
            case startTime
            case taskId
        }
    }

    public struct ListAuditFindingsResponse: AWSDecodableShape {
        /// The findings (results) of the audit.
        public let findings: [AuditFinding]?
        /// A token that can be used to retrieve the next set of results, or null if there are no additional results.
        public let nextToken: String?

        public init(findings: [AuditFinding]? = nil, nextToken: String? = nil) {
            self.findings = findings
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case findings
            case nextToken
        }
    }

    public struct ListAuditMitigationActionsExecutionsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "actionStatus", location: .querystring(locationName: "actionStatus")),
            AWSMemberEncoding(label: "findingId", location: .querystring(locationName: "findingId")),
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken")),
            AWSMemberEncoding(label: "taskId", location: .querystring(locationName: "taskId"))
        ]

        /// Specify this filter to limit results to those with a specific status.
        public let actionStatus: AuditMitigationActionsExecutionStatus?
        /// Specify this filter to limit results to those that were applied to a specific audit finding.
        public let findingId: String
        /// The maximum number of results to return at one time. The default is 25.
        public let maxResults: Int?
        /// The token for the next set of results.
        public let nextToken: String?
        /// Specify this filter to limit results to actions for a specific audit mitigation actions task.
        public let taskId: String

        public init(actionStatus: AuditMitigationActionsExecutionStatus? = nil, findingId: String, maxResults: Int? = nil, nextToken: String? = nil, taskId: String) {
            self.actionStatus = actionStatus
            self.findingId = findingId
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.taskId = taskId
        }

        public func validate(name: String) throws {
            try self.validate(self.findingId, name: "findingId", parent: name, max: 128)
            try self.validate(self.findingId, name: "findingId", parent: name, min: 1)
            try self.validate(self.findingId, name: "findingId", parent: name, pattern: "[a-zA-Z0-9_-]+")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.taskId, name: "taskId", parent: name, max: 128)
            try self.validate(self.taskId, name: "taskId", parent: name, min: 1)
            try self.validate(self.taskId, name: "taskId", parent: name, pattern: "[a-zA-Z0-9_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListAuditMitigationActionsExecutionsResponse: AWSDecodableShape {
        /// A set of task execution results based on the input parameters. Details include the mitigation action applied, start time, and task status.
        public let actionsExecutions: [AuditMitigationActionExecutionMetadata]?
        /// The token for the next set of results.
        public let nextToken: String?

        public init(actionsExecutions: [AuditMitigationActionExecutionMetadata]? = nil, nextToken: String? = nil) {
            self.actionsExecutions = actionsExecutions
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case actionsExecutions
            case nextToken
        }
    }

    public struct ListAuditMitigationActionsTasksRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "auditTaskId", location: .querystring(locationName: "auditTaskId")),
            AWSMemberEncoding(label: "endTime", location: .querystring(locationName: "endTime")),
            AWSMemberEncoding(label: "findingId", location: .querystring(locationName: "findingId")),
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken")),
            AWSMemberEncoding(label: "startTime", location: .querystring(locationName: "startTime")),
            AWSMemberEncoding(label: "taskStatus", location: .querystring(locationName: "taskStatus"))
        ]

        /// Specify this filter to limit results to tasks that were applied to results for a specific audit.
        public let auditTaskId: String?
        /// Specify this filter to limit results to tasks that were completed or canceled on or before a specific date and time.
        public let endTime: Date
        /// Specify this filter to limit results to tasks that were applied to a specific audit finding.
        public let findingId: String?
        /// The maximum number of results to return at one time. The default is 25.
        public let maxResults: Int?
        /// The token for the next set of results.
        public let nextToken: String?
        /// Specify this filter to limit results to tasks that began on or after a specific date and time.
        public let startTime: Date
        /// Specify this filter to limit results to tasks that are in a specific state.
        public let taskStatus: AuditMitigationActionsTaskStatus?

        public init(auditTaskId: String? = nil, endTime: Date, findingId: String? = nil, maxResults: Int? = nil, nextToken: String? = nil, startTime: Date, taskStatus: AuditMitigationActionsTaskStatus? = nil) {
            self.auditTaskId = auditTaskId
            self.endTime = endTime
            self.findingId = findingId
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.startTime = startTime
            self.taskStatus = taskStatus
        }

        public func validate(name: String) throws {
            try self.validate(self.auditTaskId, name: "auditTaskId", parent: name, max: 40)
            try self.validate(self.auditTaskId, name: "auditTaskId", parent: name, min: 1)
            try self.validate(self.auditTaskId, name: "auditTaskId", parent: name, pattern: "[a-zA-Z0-9\\-]+")
            try self.validate(self.findingId, name: "findingId", parent: name, max: 128)
            try self.validate(self.findingId, name: "findingId", parent: name, min: 1)
            try self.validate(self.findingId, name: "findingId", parent: name, pattern: "[a-zA-Z0-9_-]+")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListAuditMitigationActionsTasksResponse: AWSDecodableShape {
        /// The token for the next set of results.
        public let nextToken: String?
        /// The collection of audit mitigation tasks that matched the filter criteria.
        public let tasks: [AuditMitigationActionsTaskMetadata]?

        public init(nextToken: String? = nil, tasks: [AuditMitigationActionsTaskMetadata]? = nil) {
            self.nextToken = nextToken
            self.tasks = tasks
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case tasks
        }
    }

    public struct ListAuditSuppressionsRequest: AWSEncodableShape {
        ///  Determines whether suppressions are listed in ascending order by expiration date or not. If parameter isn't provided, ascendingOrder=true.
        public let ascendingOrder: Bool?
        public let checkName: String?
        ///  The maximum number of results to return at one time. The default is 25.
        public let maxResults: Int?
        ///  The token for the next set of results.
        public let nextToken: String?
        public let resourceIdentifier: ResourceIdentifier?

        public init(ascendingOrder: Bool? = nil, checkName: String? = nil, maxResults: Int? = nil, nextToken: String? = nil, resourceIdentifier: ResourceIdentifier? = nil) {
            self.ascendingOrder = ascendingOrder
            self.checkName = checkName
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.resourceIdentifier = resourceIdentifier
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.resourceIdentifier?.validate(name: "\(name).resourceIdentifier")
        }

        private enum CodingKeys: String, CodingKey {
            case ascendingOrder
            case checkName
            case maxResults
            case nextToken
            case resourceIdentifier
        }
    }

    public struct ListAuditSuppressionsResponse: AWSDecodableShape {
        ///  A token that can be used to retrieve the next set of results, or null if there are no additional results.
        public let nextToken: String?
        ///  List of audit suppressions.
        public let suppressions: [AuditSuppression]?

        public init(nextToken: String? = nil, suppressions: [AuditSuppression]? = nil) {
            self.nextToken = nextToken
            self.suppressions = suppressions
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case suppressions
        }
    }

    public struct ListAuditTasksRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "endTime", location: .querystring(locationName: "endTime")),
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken")),
            AWSMemberEncoding(label: "startTime", location: .querystring(locationName: "startTime")),
            AWSMemberEncoding(label: "taskStatus", location: .querystring(locationName: "taskStatus")),
            AWSMemberEncoding(label: "taskType", location: .querystring(locationName: "taskType"))
        ]

        /// The end of the time period.
        public let endTime: Date
        /// The maximum number of results to return at one time. The default is 25.
        public let maxResults: Int?
        /// The token for the next set of results.
        public let nextToken: String?
        /// The beginning of the time period. Audit information is retained for a limited time (90 days). Requesting a start time prior to what is retained results in an "InvalidRequestException".
        public let startTime: Date
        /// A filter to limit the output to audits with the specified completion status: can be one of "IN_PROGRESS", "COMPLETED", "FAILED", or "CANCELED".
        public let taskStatus: AuditTaskStatus?
        /// A filter to limit the output to the specified type of audit: can be one of "ON_DEMAND_AUDIT_TASK" or "SCHEDULED__AUDIT_TASK".
        public let taskType: AuditTaskType?

        public init(endTime: Date, maxResults: Int? = nil, nextToken: String? = nil, startTime: Date, taskStatus: AuditTaskStatus? = nil, taskType: AuditTaskType? = nil) {
            self.endTime = endTime
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.startTime = startTime
            self.taskStatus = taskStatus
            self.taskType = taskType
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListAuditTasksResponse: AWSDecodableShape {
        /// A token that can be used to retrieve the next set of results, or null if there are no additional results.
        public let nextToken: String?
        /// The audits that were performed during the specified time period.
        public let tasks: [AuditTaskMetadata]?

        public init(nextToken: String? = nil, tasks: [AuditTaskMetadata]? = nil) {
            self.nextToken = nextToken
            self.tasks = tasks
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case tasks
        }
    }

    public struct ListAuthorizersRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "ascendingOrder", location: .querystring(locationName: "isAscendingOrder")),
            AWSMemberEncoding(label: "marker", location: .querystring(locationName: "marker")),
            AWSMemberEncoding(label: "pageSize", location: .querystring(locationName: "pageSize")),
            AWSMemberEncoding(label: "status", location: .querystring(locationName: "status"))
        ]

        /// Return the list of authorizers in ascending alphabetical order.
        public let ascendingOrder: Bool?
        /// A marker used to get the next set of results.
        public let marker: String?
        /// The maximum number of results to return at one time.
        public let pageSize: Int?
        /// The status of the list authorizers request.
        public let status: AuthorizerStatus?

        public init(ascendingOrder: Bool? = nil, marker: String? = nil, pageSize: Int? = nil, status: AuthorizerStatus? = nil) {
            self.ascendingOrder = ascendingOrder
            self.marker = marker
            self.pageSize = pageSize
            self.status = status
        }

        public func validate(name: String) throws {
            try self.validate(self.marker, name: "marker", parent: name, max: 1024)
            try self.validate(self.marker, name: "marker", parent: name, pattern: "[A-Za-z0-9+/]+={0,2}")
            try self.validate(self.pageSize, name: "pageSize", parent: name, max: 250)
            try self.validate(self.pageSize, name: "pageSize", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListAuthorizersResponse: AWSDecodableShape {
        /// The authorizers.
        public let authorizers: [AuthorizerSummary]?
        /// A marker used to get the next set of results.
        public let nextMarker: String?

        public init(authorizers: [AuthorizerSummary]? = nil, nextMarker: String? = nil) {
            self.authorizers = authorizers
            self.nextMarker = nextMarker
        }

        private enum CodingKeys: String, CodingKey {
            case authorizers
            case nextMarker
        }
    }

    public struct ListBillingGroupsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "namePrefixFilter", location: .querystring(locationName: "namePrefixFilter")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken"))
        ]

        /// The maximum number of results to return per request.
        public let maxResults: Int?
        /// Limit the results to billing groups whose names have the given prefix.
        public let namePrefixFilter: String?
        /// To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.
        public let nextToken: String?

        public init(maxResults: Int? = nil, namePrefixFilter: String? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.namePrefixFilter = namePrefixFilter
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.namePrefixFilter, name: "namePrefixFilter", parent: name, max: 128)
            try self.validate(self.namePrefixFilter, name: "namePrefixFilter", parent: name, min: 1)
            try self.validate(self.namePrefixFilter, name: "namePrefixFilter", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListBillingGroupsResponse: AWSDecodableShape {
        /// The list of billing groups.
        public let billingGroups: [GroupNameAndArn]?
        /// The token to use to get the next set of results, or null if there are no additional results.
        public let nextToken: String?

        public init(billingGroups: [GroupNameAndArn]? = nil, nextToken: String? = nil) {
            self.billingGroups = billingGroups
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case billingGroups
            case nextToken
        }
    }

    public struct ListCACertificatesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "ascendingOrder", location: .querystring(locationName: "isAscendingOrder")),
            AWSMemberEncoding(label: "marker", location: .querystring(locationName: "marker")),
            AWSMemberEncoding(label: "pageSize", location: .querystring(locationName: "pageSize"))
        ]

        /// Determines the order of the results.
        public let ascendingOrder: Bool?
        /// The marker for the next set of results.
        public let marker: String?
        /// The result page size.
        public let pageSize: Int?

        public init(ascendingOrder: Bool? = nil, marker: String? = nil, pageSize: Int? = nil) {
            self.ascendingOrder = ascendingOrder
            self.marker = marker
            self.pageSize = pageSize
        }

        public func validate(name: String) throws {
            try self.validate(self.marker, name: "marker", parent: name, max: 1024)
            try self.validate(self.marker, name: "marker", parent: name, pattern: "[A-Za-z0-9+/]+={0,2}")
            try self.validate(self.pageSize, name: "pageSize", parent: name, max: 250)
            try self.validate(self.pageSize, name: "pageSize", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListCACertificatesResponse: AWSDecodableShape {
        /// The CA certificates registered in your AWS account.
        public let certificates: [CACertificate]?
        /// The current position within the list of CA certificates.
        public let nextMarker: String?

        public init(certificates: [CACertificate]? = nil, nextMarker: String? = nil) {
            self.certificates = certificates
            self.nextMarker = nextMarker
        }

        private enum CodingKeys: String, CodingKey {
            case certificates
            case nextMarker
        }
    }

    public struct ListCertificatesByCARequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "ascendingOrder", location: .querystring(locationName: "isAscendingOrder")),
            AWSMemberEncoding(label: "caCertificateId", location: .uri(locationName: "caCertificateId")),
            AWSMemberEncoding(label: "marker", location: .querystring(locationName: "marker")),
            AWSMemberEncoding(label: "pageSize", location: .querystring(locationName: "pageSize"))
        ]

        /// Specifies the order for results. If True, the results are returned in ascending order, based on the creation date.
        public let ascendingOrder: Bool?
        /// The ID of the CA certificate. This operation will list all registered device certificate that were signed by this CA certificate.
        public let caCertificateId: String
        /// The marker for the next set of results.
        public let marker: String?
        /// The result page size.
        public let pageSize: Int?

        public init(ascendingOrder: Bool? = nil, caCertificateId: String, marker: String? = nil, pageSize: Int? = nil) {
            self.ascendingOrder = ascendingOrder
            self.caCertificateId = caCertificateId
            self.marker = marker
            self.pageSize = pageSize
        }

        public func validate(name: String) throws {
            try self.validate(self.caCertificateId, name: "caCertificateId", parent: name, max: 64)
            try self.validate(self.caCertificateId, name: "caCertificateId", parent: name, min: 64)
            try self.validate(self.caCertificateId, name: "caCertificateId", parent: name, pattern: "(0x)?[a-fA-F0-9]+")
            try self.validate(self.marker, name: "marker", parent: name, max: 1024)
            try self.validate(self.marker, name: "marker", parent: name, pattern: "[A-Za-z0-9+/]+={0,2}")
            try self.validate(self.pageSize, name: "pageSize", parent: name, max: 250)
            try self.validate(self.pageSize, name: "pageSize", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListCertificatesByCAResponse: AWSDecodableShape {
        /// The device certificates signed by the specified CA certificate.
        public let certificates: [Certificate]?
        /// The marker for the next set of results, or null if there are no additional results.
        public let nextMarker: String?

        public init(certificates: [Certificate]? = nil, nextMarker: String? = nil) {
            self.certificates = certificates
            self.nextMarker = nextMarker
        }

        private enum CodingKeys: String, CodingKey {
            case certificates
            case nextMarker
        }
    }

    public struct ListCertificatesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "ascendingOrder", location: .querystring(locationName: "isAscendingOrder")),
            AWSMemberEncoding(label: "marker", location: .querystring(locationName: "marker")),
            AWSMemberEncoding(label: "pageSize", location: .querystring(locationName: "pageSize"))
        ]

        /// Specifies the order for results. If True, the results are returned in ascending order, based on the creation date.
        public let ascendingOrder: Bool?
        /// The marker for the next set of results.
        public let marker: String?
        /// The result page size.
        public let pageSize: Int?

        public init(ascendingOrder: Bool? = nil, marker: String? = nil, pageSize: Int? = nil) {
            self.ascendingOrder = ascendingOrder
            self.marker = marker
            self.pageSize = pageSize
        }

        public func validate(name: String) throws {
            try self.validate(self.marker, name: "marker", parent: name, max: 1024)
            try self.validate(self.marker, name: "marker", parent: name, pattern: "[A-Za-z0-9+/]+={0,2}")
            try self.validate(self.pageSize, name: "pageSize", parent: name, max: 250)
            try self.validate(self.pageSize, name: "pageSize", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListCertificatesResponse: AWSDecodableShape {
        /// The descriptions of the certificates.
        public let certificates: [Certificate]?
        /// The marker for the next set of results, or null if there are no additional results.
        public let nextMarker: String?

        public init(certificates: [Certificate]? = nil, nextMarker: String? = nil) {
            self.certificates = certificates
            self.nextMarker = nextMarker
        }

        private enum CodingKeys: String, CodingKey {
            case certificates
            case nextMarker
        }
    }

    public struct ListCustomMetricsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken"))
        ]

        ///  The maximum number of results to return at one time. The default is 25.
        public let maxResults: Int?
        ///  The token for the next set of results.
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListCustomMetricsResponse: AWSDecodableShape {
        ///  The name of the custom metric.
        public let metricNames: [String]?
        ///  A token that can be used to retrieve the next set of results, or null if there are no additional results.
        public let nextToken: String?

        public init(metricNames: [String]? = nil, nextToken: String? = nil) {
            self.metricNames = metricNames
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case metricNames
            case nextToken
        }
    }

    public struct ListDetectMitigationActionsExecutionsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "endTime", location: .querystring(locationName: "endTime")),
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken")),
            AWSMemberEncoding(label: "startTime", location: .querystring(locationName: "startTime")),
            AWSMemberEncoding(label: "taskId", location: .querystring(locationName: "taskId")),
            AWSMemberEncoding(label: "thingName", location: .querystring(locationName: "thingName")),
            AWSMemberEncoding(label: "violationId", location: .querystring(locationName: "violationId"))
        ]

        ///  The end of the time period for which ML Detect mitigation actions executions are returned.
        public let endTime: Date?
        ///  The maximum number of results to return at one time. The default is 25.
        public let maxResults: Int?
        ///  The token for the next set of results.
        public let nextToken: String?
        ///  A filter to limit results to those found after the specified time. You must specify either the startTime and endTime or the taskId, but not both.
        public let startTime: Date?
        ///  The unique identifier of the task.
        public let taskId: String?
        ///  The name of the thing whose mitigation actions are listed.
        public let thingName: String?
        ///  The unique identifier of the violation.
        public let violationId: String?

        public init(endTime: Date? = nil, maxResults: Int? = nil, nextToken: String? = nil, startTime: Date? = nil, taskId: String? = nil, thingName: String? = nil, violationId: String? = nil) {
            self.endTime = endTime
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.startTime = startTime
            self.taskId = taskId
            self.thingName = thingName
            self.violationId = violationId
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.taskId, name: "taskId", parent: name, max: 128)
            try self.validate(self.taskId, name: "taskId", parent: name, min: 1)
            try self.validate(self.taskId, name: "taskId", parent: name, pattern: "[a-zA-Z0-9_-]+")
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
            try self.validate(self.violationId, name: "violationId", parent: name, max: 128)
            try self.validate(self.violationId, name: "violationId", parent: name, min: 1)
            try self.validate(self.violationId, name: "violationId", parent: name, pattern: "[a-zA-Z0-9\\-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListDetectMitigationActionsExecutionsResponse: AWSDecodableShape {
        ///  List of actions executions.
        public let actionsExecutions: [DetectMitigationActionExecution]?
        ///  A token that can be used to retrieve the next set of results, or null if there are no additional results.
        public let nextToken: String?

        public init(actionsExecutions: [DetectMitigationActionExecution]? = nil, nextToken: String? = nil) {
            self.actionsExecutions = actionsExecutions
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case actionsExecutions
            case nextToken
        }
    }

    public struct ListDetectMitigationActionsTasksRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "endTime", location: .querystring(locationName: "endTime")),
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken")),
            AWSMemberEncoding(label: "startTime", location: .querystring(locationName: "startTime"))
        ]

        ///  The end of the time period for which ML Detect mitigation actions tasks are returned.
        public let endTime: Date
        /// The maximum number of results to return at one time. The default is 25.
        public let maxResults: Int?
        ///  The token for the next set of results.
        public let nextToken: String?
        ///  A filter to limit results to those found after the specified time. You must specify either the startTime and endTime or the taskId, but not both.
        public let startTime: Date

        public init(endTime: Date, maxResults: Int? = nil, nextToken: String? = nil, startTime: Date) {
            self.endTime = endTime
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.startTime = startTime
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListDetectMitigationActionsTasksResponse: AWSDecodableShape {
        ///  A token that can be used to retrieve the next set of results, or null if there are no additional results.
        public let nextToken: String?
        ///  The collection of ML Detect mitigation tasks that matched the filter criteria.
        public let tasks: [DetectMitigationActionsTaskSummary]?

        public init(nextToken: String? = nil, tasks: [DetectMitigationActionsTaskSummary]? = nil) {
            self.nextToken = nextToken
            self.tasks = tasks
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case tasks
        }
    }

    public struct ListDimensionsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken"))
        ]

        /// The maximum number of results to retrieve at one time.
        public let maxResults: Int?
        /// The token for the next set of results.
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListDimensionsResponse: AWSDecodableShape {
        /// A list of the names of the defined dimensions. Use DescribeDimension to get details for a dimension.
        public let dimensionNames: [String]?
        /// A token that can be used to retrieve the next set of results, or null if there are no additional results.
        public let nextToken: String?

        public init(dimensionNames: [String]? = nil, nextToken: String? = nil) {
            self.dimensionNames = dimensionNames
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case dimensionNames
            case nextToken
        }
    }

    public struct ListDomainConfigurationsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "marker", location: .querystring(locationName: "marker")),
            AWSMemberEncoding(label: "pageSize", location: .querystring(locationName: "pageSize")),
            AWSMemberEncoding(label: "serviceType", location: .querystring(locationName: "serviceType"))
        ]

        /// The marker for the next set of results.
        public let marker: String?
        /// The result page size.
        public let pageSize: Int?
        /// The type of service delivered by the endpoint.
        public let serviceType: ServiceType?

        public init(marker: String? = nil, pageSize: Int? = nil, serviceType: ServiceType? = nil) {
            self.marker = marker
            self.pageSize = pageSize
            self.serviceType = serviceType
        }

        public func validate(name: String) throws {
            try self.validate(self.marker, name: "marker", parent: name, max: 1024)
            try self.validate(self.marker, name: "marker", parent: name, pattern: "[A-Za-z0-9+/]+={0,2}")
            try self.validate(self.pageSize, name: "pageSize", parent: name, max: 250)
            try self.validate(self.pageSize, name: "pageSize", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListDomainConfigurationsResponse: AWSDecodableShape {
        /// A list of objects that contain summary information about the user's domain configurations.
        public let domainConfigurations: [DomainConfigurationSummary]?
        /// The marker for the next set of results.
        public let nextMarker: String?

        public init(domainConfigurations: [DomainConfigurationSummary]? = nil, nextMarker: String? = nil) {
            self.domainConfigurations = domainConfigurations
            self.nextMarker = nextMarker
        }

        private enum CodingKeys: String, CodingKey {
            case domainConfigurations
            case nextMarker
        }
    }

    public struct ListIndicesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken"))
        ]

        /// The maximum number of results to return at one time.
        public let maxResults: Int?
        /// The token used to get the next set of results, or null if there are no additional results.
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListIndicesResponse: AWSDecodableShape {
        /// The index names.
        public let indexNames: [String]?
        /// The token used to get the next set of results, or null if there are no additional results.
        public let nextToken: String?

        public init(indexNames: [String]? = nil, nextToken: String? = nil) {
            self.indexNames = indexNames
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case indexNames
            case nextToken
        }
    }

    public struct ListJobExecutionsForJobRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "jobId", location: .uri(locationName: "jobId")),
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken")),
            AWSMemberEncoding(label: "status", location: .querystring(locationName: "status"))
        ]

        /// The unique identifier you assigned to this job when it was created.
        public let jobId: String
        /// The maximum number of results to be returned per request.
        public let maxResults: Int?
        /// The token to retrieve the next set of results.
        public let nextToken: String?
        /// The status of the job.
        public let status: JobExecutionStatus?

        public init(jobId: String, maxResults: Int? = nil, nextToken: String? = nil, status: JobExecutionStatus? = nil) {
            self.jobId = jobId
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.status = status
        }

        public func validate(name: String) throws {
            try self.validate(self.jobId, name: "jobId", parent: name, max: 64)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "[a-zA-Z0-9_-]+")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListJobExecutionsForJobResponse: AWSDecodableShape {
        /// A list of job execution summaries.
        public let executionSummaries: [JobExecutionSummaryForJob]?
        /// The token for the next set of results, or null if there are no additional results.
        public let nextToken: String?

        public init(executionSummaries: [JobExecutionSummaryForJob]? = nil, nextToken: String? = nil) {
            self.executionSummaries = executionSummaries
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case executionSummaries
            case nextToken
        }
    }

    public struct ListJobExecutionsForThingRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "namespaceId", location: .querystring(locationName: "namespaceId")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken")),
            AWSMemberEncoding(label: "status", location: .querystring(locationName: "status")),
            AWSMemberEncoding(label: "thingName", location: .uri(locationName: "thingName"))
        ]

        /// The maximum number of results to be returned per request.
        public let maxResults: Int?
        /// The namespace used to indicate that a job is a customer-managed job. When you specify a value for this parameter, AWS IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.  $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/   The namespaceId feature is in public preview.
        public let namespaceId: String?
        /// The token to retrieve the next set of results.
        public let nextToken: String?
        /// An optional filter that lets you search for jobs that have the specified status.
        public let status: JobExecutionStatus?
        /// The thing name.
        public let thingName: String

        public init(maxResults: Int? = nil, namespaceId: String? = nil, nextToken: String? = nil, status: JobExecutionStatus? = nil, thingName: String) {
            self.maxResults = maxResults
            self.namespaceId = namespaceId
            self.nextToken = nextToken
            self.status = status
            self.thingName = thingName
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.namespaceId, name: "namespaceId", parent: name, max: 64)
            try self.validate(self.namespaceId, name: "namespaceId", parent: name, min: 1)
            try self.validate(self.namespaceId, name: "namespaceId", parent: name, pattern: "[a-zA-Z0-9_-]+")
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListJobExecutionsForThingResponse: AWSDecodableShape {
        /// A list of job execution summaries.
        public let executionSummaries: [JobExecutionSummaryForThing]?
        /// The token for the next set of results, or null if there are no additional results.
        public let nextToken: String?

        public init(executionSummaries: [JobExecutionSummaryForThing]? = nil, nextToken: String? = nil) {
            self.executionSummaries = executionSummaries
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case executionSummaries
            case nextToken
        }
    }

    public struct ListJobsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "namespaceId", location: .querystring(locationName: "namespaceId")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken")),
            AWSMemberEncoding(label: "status", location: .querystring(locationName: "status")),
            AWSMemberEncoding(label: "targetSelection", location: .querystring(locationName: "targetSelection")),
            AWSMemberEncoding(label: "thingGroupId", location: .querystring(locationName: "thingGroupId")),
            AWSMemberEncoding(label: "thingGroupName", location: .querystring(locationName: "thingGroupName"))
        ]

        /// The maximum number of results to return per request.
        public let maxResults: Int?
        /// The namespace used to indicate that a job is a customer-managed job. When you specify a value for this parameter, AWS IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.  $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/   The namespaceId feature is in public preview.
        public let namespaceId: String?
        /// The token to retrieve the next set of results.
        public let nextToken: String?
        /// An optional filter that lets you search for jobs that have the specified status.
        public let status: JobStatus?
        /// Specifies whether the job will continue to run (CONTINUOUS), or will be complete after all those things specified as targets have completed the job (SNAPSHOT). If continuous, the job may also be run on a thing when a change is detected in a target. For example, a job will run on a thing when the thing is added to a target group, even after the job was completed by all things originally in the group.
        public let targetSelection: TargetSelection?
        /// A filter that limits the returned jobs to those for the specified group.
        public let thingGroupId: String?
        /// A filter that limits the returned jobs to those for the specified group.
        public let thingGroupName: String?

        public init(maxResults: Int? = nil, namespaceId: String? = nil, nextToken: String? = nil, status: JobStatus? = nil, targetSelection: TargetSelection? = nil, thingGroupId: String? = nil, thingGroupName: String? = nil) {
            self.maxResults = maxResults
            self.namespaceId = namespaceId
            self.nextToken = nextToken
            self.status = status
            self.targetSelection = targetSelection
            self.thingGroupId = thingGroupId
            self.thingGroupName = thingGroupName
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.namespaceId, name: "namespaceId", parent: name, max: 64)
            try self.validate(self.namespaceId, name: "namespaceId", parent: name, min: 1)
            try self.validate(self.namespaceId, name: "namespaceId", parent: name, pattern: "[a-zA-Z0-9_-]+")
            try self.validate(self.thingGroupId, name: "thingGroupId", parent: name, max: 128)
            try self.validate(self.thingGroupId, name: "thingGroupId", parent: name, min: 1)
            try self.validate(self.thingGroupId, name: "thingGroupId", parent: name, pattern: "[a-zA-Z0-9\\-]+")
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, max: 128)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, min: 1)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListJobsResponse: AWSDecodableShape {
        /// A list of jobs.
        public let jobs: [JobSummary]?
        /// The token for the next set of results, or null if there are no additional results.
        public let nextToken: String?

        public init(jobs: [JobSummary]? = nil, nextToken: String? = nil) {
            self.jobs = jobs
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case jobs
            case nextToken
        }
    }

    public struct ListMitigationActionsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "actionType", location: .querystring(locationName: "actionType")),
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken"))
        ]

        /// Specify a value to limit the result to mitigation actions with a specific action type.
        public let actionType: MitigationActionType?
        /// The maximum number of results to return at one time. The default is 25.
        public let maxResults: Int?
        /// The token for the next set of results.
        public let nextToken: String?

        public init(actionType: MitigationActionType? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.actionType = actionType
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListMitigationActionsResponse: AWSDecodableShape {
        /// A set of actions that matched the specified filter criteria.
        public let actionIdentifiers: [MitigationActionIdentifier]?
        /// The token for the next set of results.
        public let nextToken: String?

        public init(actionIdentifiers: [MitigationActionIdentifier]? = nil, nextToken: String? = nil) {
            self.actionIdentifiers = actionIdentifiers
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case actionIdentifiers
            case nextToken
        }
    }

    public struct ListOTAUpdatesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken")),
            AWSMemberEncoding(label: "otaUpdateStatus", location: .querystring(locationName: "otaUpdateStatus"))
        ]

        /// The maximum number of results to return at one time.
        public let maxResults: Int?
        /// A token used to retrieve the next set of results.
        public let nextToken: String?
        /// The OTA update job status.
        public let otaUpdateStatus: OTAUpdateStatus?

        public init(maxResults: Int? = nil, nextToken: String? = nil, otaUpdateStatus: OTAUpdateStatus? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.otaUpdateStatus = otaUpdateStatus
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListOTAUpdatesResponse: AWSDecodableShape {
        /// A token to use to get the next set of results.
        public let nextToken: String?
        /// A list of OTA update jobs.
        public let otaUpdates: [OTAUpdateSummary]?

        public init(nextToken: String? = nil, otaUpdates: [OTAUpdateSummary]? = nil) {
            self.nextToken = nextToken
            self.otaUpdates = otaUpdates
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case otaUpdates
        }
    }

    public struct ListOutgoingCertificatesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "ascendingOrder", location: .querystring(locationName: "isAscendingOrder")),
            AWSMemberEncoding(label: "marker", location: .querystring(locationName: "marker")),
            AWSMemberEncoding(label: "pageSize", location: .querystring(locationName: "pageSize"))
        ]

        /// Specifies the order for results. If True, the results are returned in ascending order, based on the creation date.
        public let ascendingOrder: Bool?
        /// The marker for the next set of results.
        public let marker: String?
        /// The result page size.
        public let pageSize: Int?

        public init(ascendingOrder: Bool? = nil, marker: String? = nil, pageSize: Int? = nil) {
            self.ascendingOrder = ascendingOrder
            self.marker = marker
            self.pageSize = pageSize
        }

        public func validate(name: String) throws {
            try self.validate(self.marker, name: "marker", parent: name, max: 1024)
            try self.validate(self.marker, name: "marker", parent: name, pattern: "[A-Za-z0-9+/]+={0,2}")
            try self.validate(self.pageSize, name: "pageSize", parent: name, max: 250)
            try self.validate(self.pageSize, name: "pageSize", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListOutgoingCertificatesResponse: AWSDecodableShape {
        /// The marker for the next set of results.
        public let nextMarker: String?
        /// The certificates that are being transferred but not yet accepted.
        public let outgoingCertificates: [OutgoingCertificate]?

        public init(nextMarker: String? = nil, outgoingCertificates: [OutgoingCertificate]? = nil) {
            self.nextMarker = nextMarker
            self.outgoingCertificates = outgoingCertificates
        }

        private enum CodingKeys: String, CodingKey {
            case nextMarker
            case outgoingCertificates
        }
    }

    public struct ListPoliciesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "ascendingOrder", location: .querystring(locationName: "isAscendingOrder")),
            AWSMemberEncoding(label: "marker", location: .querystring(locationName: "marker")),
            AWSMemberEncoding(label: "pageSize", location: .querystring(locationName: "pageSize"))
        ]

        /// Specifies the order for results. If true, the results are returned in ascending creation order.
        public let ascendingOrder: Bool?
        /// The marker for the next set of results.
        public let marker: String?
        /// The result page size.
        public let pageSize: Int?

        public init(ascendingOrder: Bool? = nil, marker: String? = nil, pageSize: Int? = nil) {
            self.ascendingOrder = ascendingOrder
            self.marker = marker
            self.pageSize = pageSize
        }

        public func validate(name: String) throws {
            try self.validate(self.marker, name: "marker", parent: name, max: 1024)
            try self.validate(self.marker, name: "marker", parent: name, pattern: "[A-Za-z0-9+/]+={0,2}")
            try self.validate(self.pageSize, name: "pageSize", parent: name, max: 250)
            try self.validate(self.pageSize, name: "pageSize", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListPoliciesResponse: AWSDecodableShape {
        /// The marker for the next set of results, or null if there are no additional results.
        public let nextMarker: String?
        /// The descriptions of the policies.
        public let policies: [Policy]?

        public init(nextMarker: String? = nil, policies: [Policy]? = nil) {
            self.nextMarker = nextMarker
            self.policies = policies
        }

        private enum CodingKeys: String, CodingKey {
            case nextMarker
            case policies
        }
    }

    public struct ListPolicyPrincipalsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "ascendingOrder", location: .querystring(locationName: "isAscendingOrder")),
            AWSMemberEncoding(label: "marker", location: .querystring(locationName: "marker")),
            AWSMemberEncoding(label: "pageSize", location: .querystring(locationName: "pageSize")),
            AWSMemberEncoding(label: "policyName", location: .header(locationName: "x-amzn-iot-policy"))
        ]

        /// Specifies the order for results. If true, the results are returned in ascending creation order.
        public let ascendingOrder: Bool?
        /// The marker for the next set of results.
        public let marker: String?
        /// The result page size.
        public let pageSize: Int?
        /// The policy name.
        public let policyName: String

        public init(ascendingOrder: Bool? = nil, marker: String? = nil, pageSize: Int? = nil, policyName: String) {
            self.ascendingOrder = ascendingOrder
            self.marker = marker
            self.pageSize = pageSize
            self.policyName = policyName
        }

        public func validate(name: String) throws {
            try self.validate(self.marker, name: "marker", parent: name, max: 1024)
            try self.validate(self.marker, name: "marker", parent: name, pattern: "[A-Za-z0-9+/]+={0,2}")
            try self.validate(self.pageSize, name: "pageSize", parent: name, max: 250)
            try self.validate(self.pageSize, name: "pageSize", parent: name, min: 1)
            try self.validate(self.policyName, name: "policyName", parent: name, max: 128)
            try self.validate(self.policyName, name: "policyName", parent: name, min: 1)
            try self.validate(self.policyName, name: "policyName", parent: name, pattern: "[\\w+=,.@-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListPolicyPrincipalsResponse: AWSDecodableShape {
        /// The marker for the next set of results, or null if there are no additional results.
        public let nextMarker: String?
        /// The descriptions of the principals.
        public let principals: [String]?

        public init(nextMarker: String? = nil, principals: [String]? = nil) {
            self.nextMarker = nextMarker
            self.principals = principals
        }

        private enum CodingKeys: String, CodingKey {
            case nextMarker
            case principals
        }
    }

    public struct ListPolicyVersionsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "policyName", location: .uri(locationName: "policyName"))
        ]

        /// The policy name.
        public let policyName: String

        public init(policyName: String) {
            self.policyName = policyName
        }

        public func validate(name: String) throws {
            try self.validate(self.policyName, name: "policyName", parent: name, max: 128)
            try self.validate(self.policyName, name: "policyName", parent: name, min: 1)
            try self.validate(self.policyName, name: "policyName", parent: name, pattern: "[\\w+=,.@-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListPolicyVersionsResponse: AWSDecodableShape {
        /// The policy versions.
        public let policyVersions: [PolicyVersion]?

        public init(policyVersions: [PolicyVersion]? = nil) {
            self.policyVersions = policyVersions
        }

        private enum CodingKeys: String, CodingKey {
            case policyVersions
        }
    }

    public struct ListPrincipalPoliciesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "ascendingOrder", location: .querystring(locationName: "isAscendingOrder")),
            AWSMemberEncoding(label: "marker", location: .querystring(locationName: "marker")),
            AWSMemberEncoding(label: "pageSize", location: .querystring(locationName: "pageSize")),
            AWSMemberEncoding(label: "principal", location: .header(locationName: "x-amzn-iot-principal"))
        ]

        /// Specifies the order for results. If true, results are returned in ascending creation order.
        public let ascendingOrder: Bool?
        /// The marker for the next set of results.
        public let marker: String?
        /// The result page size.
        public let pageSize: Int?
        /// The principal. Valid principals are CertificateArn (arn:aws:iot:region:accountId:cert/certificateId), thingGroupArn (arn:aws:iot:region:accountId:thinggroup/groupName) and CognitoId (region:id).
        public let principal: String

        public init(ascendingOrder: Bool? = nil, marker: String? = nil, pageSize: Int? = nil, principal: String) {
            self.ascendingOrder = ascendingOrder
            self.marker = marker
            self.pageSize = pageSize
            self.principal = principal
        }

        public func validate(name: String) throws {
            try self.validate(self.marker, name: "marker", parent: name, max: 1024)
            try self.validate(self.marker, name: "marker", parent: name, pattern: "[A-Za-z0-9+/]+={0,2}")
            try self.validate(self.pageSize, name: "pageSize", parent: name, max: 250)
            try self.validate(self.pageSize, name: "pageSize", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListPrincipalPoliciesResponse: AWSDecodableShape {
        /// The marker for the next set of results, or null if there are no additional results.
        public let nextMarker: String?
        /// The policies.
        public let policies: [Policy]?

        public init(nextMarker: String? = nil, policies: [Policy]? = nil) {
            self.nextMarker = nextMarker
            self.policies = policies
        }

        private enum CodingKeys: String, CodingKey {
            case nextMarker
            case policies
        }
    }

    public struct ListPrincipalThingsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken")),
            AWSMemberEncoding(label: "principal", location: .header(locationName: "x-amzn-principal"))
        ]

        /// The maximum number of results to return in this operation.
        public let maxResults: Int?
        /// To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.
        public let nextToken: String?
        /// The principal.
        public let principal: String

        public init(maxResults: Int? = nil, nextToken: String? = nil, principal: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.principal = principal
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListPrincipalThingsResponse: AWSDecodableShape {
        /// The token to use to get the next set of results, or null if there are no additional results.
        public let nextToken: String?
        /// The things.
        public let things: [String]?

        public init(nextToken: String? = nil, things: [String]? = nil) {
            self.nextToken = nextToken
            self.things = things
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case things
        }
    }

    public struct ListProvisioningTemplateVersionsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken")),
            AWSMemberEncoding(label: "templateName", location: .uri(locationName: "templateName"))
        ]

        /// The maximum number of results to return at one time.
        public let maxResults: Int?
        /// A token to retrieve the next set of results.
        public let nextToken: String?
        /// The name of the fleet provisioning template.
        public let templateName: String

        public init(maxResults: Int? = nil, nextToken: String? = nil, templateName: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.templateName = templateName
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.templateName, name: "templateName", parent: name, max: 36)
            try self.validate(self.templateName, name: "templateName", parent: name, min: 1)
            try self.validate(self.templateName, name: "templateName", parent: name, pattern: "^[0-9A-Za-z_-]+$")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListProvisioningTemplateVersionsResponse: AWSDecodableShape {
        /// A token to retrieve the next set of results.
        public let nextToken: String?
        /// The list of fleet provisioning template versions.
        public let versions: [ProvisioningTemplateVersionSummary]?

        public init(nextToken: String? = nil, versions: [ProvisioningTemplateVersionSummary]? = nil) {
            self.nextToken = nextToken
            self.versions = versions
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case versions
        }
    }

    public struct ListProvisioningTemplatesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken"))
        ]

        /// The maximum number of results to return at one time.
        public let maxResults: Int?
        /// A token to retrieve the next set of results.
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListProvisioningTemplatesResponse: AWSDecodableShape {
        /// A token to retrieve the next set of results.
        public let nextToken: String?
        /// A list of fleet provisioning templates
        public let templates: [ProvisioningTemplateSummary]?

        public init(nextToken: String? = nil, templates: [ProvisioningTemplateSummary]? = nil) {
            self.nextToken = nextToken
            self.templates = templates
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case templates
        }
    }

    public struct ListRoleAliasesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "ascendingOrder", location: .querystring(locationName: "isAscendingOrder")),
            AWSMemberEncoding(label: "marker", location: .querystring(locationName: "marker")),
            AWSMemberEncoding(label: "pageSize", location: .querystring(locationName: "pageSize"))
        ]

        /// Return the list of role aliases in ascending alphabetical order.
        public let ascendingOrder: Bool?
        /// A marker used to get the next set of results.
        public let marker: String?
        /// The maximum number of results to return at one time.
        public let pageSize: Int?

        public init(ascendingOrder: Bool? = nil, marker: String? = nil, pageSize: Int? = nil) {
            self.ascendingOrder = ascendingOrder
            self.marker = marker
            self.pageSize = pageSize
        }

        public func validate(name: String) throws {
            try self.validate(self.marker, name: "marker", parent: name, max: 1024)
            try self.validate(self.marker, name: "marker", parent: name, pattern: "[A-Za-z0-9+/]+={0,2}")
            try self.validate(self.pageSize, name: "pageSize", parent: name, max: 250)
            try self.validate(self.pageSize, name: "pageSize", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListRoleAliasesResponse: AWSDecodableShape {
        /// A marker used to get the next set of results.
        public let nextMarker: String?
        /// The role aliases.
        public let roleAliases: [String]?

        public init(nextMarker: String? = nil, roleAliases: [String]? = nil) {
            self.nextMarker = nextMarker
            self.roleAliases = roleAliases
        }

        private enum CodingKeys: String, CodingKey {
            case nextMarker
            case roleAliases
        }
    }

    public struct ListScheduledAuditsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken"))
        ]

        /// The maximum number of results to return at one time. The default is 25.
        public let maxResults: Int?
        /// The token for the next set of results.
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListScheduledAuditsResponse: AWSDecodableShape {
        /// A token that can be used to retrieve the next set of results, or null if there are no additional results.
        public let nextToken: String?
        /// The list of scheduled audits.
        public let scheduledAudits: [ScheduledAuditMetadata]?

        public init(nextToken: String? = nil, scheduledAudits: [ScheduledAuditMetadata]? = nil) {
            self.nextToken = nextToken
            self.scheduledAudits = scheduledAudits
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case scheduledAudits
        }
    }

    public struct ListSecurityProfilesForTargetRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken")),
            AWSMemberEncoding(label: "recursive", location: .querystring(locationName: "recursive")),
            AWSMemberEncoding(label: "securityProfileTargetArn", location: .querystring(locationName: "securityProfileTargetArn"))
        ]

        /// The maximum number of results to return at one time.
        public let maxResults: Int?
        /// The token for the next set of results.
        public let nextToken: String?
        /// If true, return child groups too.
        public let recursive: Bool?
        /// The ARN of the target (thing group) whose attached security profiles you want to get.
        public let securityProfileTargetArn: String

        public init(maxResults: Int? = nil, nextToken: String? = nil, recursive: Bool? = nil, securityProfileTargetArn: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.recursive = recursive
            self.securityProfileTargetArn = securityProfileTargetArn
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListSecurityProfilesForTargetResponse: AWSDecodableShape {
        /// A token that can be used to retrieve the next set of results, or null if there are no additional results.
        public let nextToken: String?
        /// A list of security profiles and their associated targets.
        public let securityProfileTargetMappings: [SecurityProfileTargetMapping]?

        public init(nextToken: String? = nil, securityProfileTargetMappings: [SecurityProfileTargetMapping]? = nil) {
            self.nextToken = nextToken
            self.securityProfileTargetMappings = securityProfileTargetMappings
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case securityProfileTargetMappings
        }
    }

    public struct ListSecurityProfilesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "dimensionName", location: .querystring(locationName: "dimensionName")),
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "metricName", location: .querystring(locationName: "metricName")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken"))
        ]

        /// A filter to limit results to the security profiles that use the defined dimension. Cannot be used with metricName
        public let dimensionName: String?
        /// The maximum number of results to return at one time.
        public let maxResults: Int?
        ///  The name of the custom metric. Cannot be used with dimensionName.
        public let metricName: String?
        /// The token for the next set of results.
        public let nextToken: String?

        public init(dimensionName: String? = nil, maxResults: Int? = nil, metricName: String? = nil, nextToken: String? = nil) {
            self.dimensionName = dimensionName
            self.maxResults = maxResults
            self.metricName = metricName
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.dimensionName, name: "dimensionName", parent: name, max: 128)
            try self.validate(self.dimensionName, name: "dimensionName", parent: name, min: 1)
            try self.validate(self.dimensionName, name: "dimensionName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.metricName, name: "metricName", parent: name, max: 128)
            try self.validate(self.metricName, name: "metricName", parent: name, min: 1)
            try self.validate(self.metricName, name: "metricName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListSecurityProfilesResponse: AWSDecodableShape {
        /// A token that can be used to retrieve the next set of results, or null if there are no additional results.
        public let nextToken: String?
        /// A list of security profile identifiers (names and ARNs).
        public let securityProfileIdentifiers: [SecurityProfileIdentifier]?

        public init(nextToken: String? = nil, securityProfileIdentifiers: [SecurityProfileIdentifier]? = nil) {
            self.nextToken = nextToken
            self.securityProfileIdentifiers = securityProfileIdentifiers
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case securityProfileIdentifiers
        }
    }

    public struct ListStreamsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "ascendingOrder", location: .querystring(locationName: "isAscendingOrder")),
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken"))
        ]

        /// Set to true to return the list of streams in ascending order.
        public let ascendingOrder: Bool?
        /// The maximum number of results to return at a time.
        public let maxResults: Int?
        /// A token used to get the next set of results.
        public let nextToken: String?

        public init(ascendingOrder: Bool? = nil, maxResults: Int? = nil, nextToken: String? = nil) {
            self.ascendingOrder = ascendingOrder
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListStreamsResponse: AWSDecodableShape {
        /// A token used to get the next set of results.
        public let nextToken: String?
        /// A list of streams.
        public let streams: [StreamSummary]?

        public init(nextToken: String? = nil, streams: [StreamSummary]? = nil) {
            self.nextToken = nextToken
            self.streams = streams
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case streams
        }
    }

    public struct ListTagsForResourceRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken")),
            AWSMemberEncoding(label: "resourceArn", location: .querystring(locationName: "resourceArn"))
        ]

        /// To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.
        public let nextToken: String?
        /// The ARN of the resource.
        public let resourceArn: String

        public init(nextToken: String? = nil, resourceArn: String) {
            self.nextToken = nextToken
            self.resourceArn = resourceArn
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListTagsForResourceResponse: AWSDecodableShape {
        /// The token to use to get the next set of results, or null if there are no additional results.
        public let nextToken: String?
        /// The list of tags assigned to the resource.
        public let tags: [Tag]?

        public init(nextToken: String? = nil, tags: [Tag]? = nil) {
            self.nextToken = nextToken
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case tags
        }
    }

    public struct ListTargetsForPolicyRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "marker", location: .querystring(locationName: "marker")),
            AWSMemberEncoding(label: "pageSize", location: .querystring(locationName: "pageSize")),
            AWSMemberEncoding(label: "policyName", location: .uri(locationName: "policyName"))
        ]

        /// A marker used to get the next set of results.
        public let marker: String?
        /// The maximum number of results to return at one time.
        public let pageSize: Int?
        /// The policy name.
        public let policyName: String

        public init(marker: String? = nil, pageSize: Int? = nil, policyName: String) {
            self.marker = marker
            self.pageSize = pageSize
            self.policyName = policyName
        }

        public func validate(name: String) throws {
            try self.validate(self.marker, name: "marker", parent: name, max: 1024)
            try self.validate(self.marker, name: "marker", parent: name, pattern: "[A-Za-z0-9+/]+={0,2}")
            try self.validate(self.pageSize, name: "pageSize", parent: name, max: 250)
            try self.validate(self.pageSize, name: "pageSize", parent: name, min: 1)
            try self.validate(self.policyName, name: "policyName", parent: name, max: 128)
            try self.validate(self.policyName, name: "policyName", parent: name, min: 1)
            try self.validate(self.policyName, name: "policyName", parent: name, pattern: "[\\w+=,.@-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListTargetsForPolicyResponse: AWSDecodableShape {
        /// A marker used to get the next set of results.
        public let nextMarker: String?
        /// The policy targets.
        public let targets: [String]?

        public init(nextMarker: String? = nil, targets: [String]? = nil) {
            self.nextMarker = nextMarker
            self.targets = targets
        }

        private enum CodingKeys: String, CodingKey {
            case nextMarker
            case targets
        }
    }

    public struct ListTargetsForSecurityProfileRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken")),
            AWSMemberEncoding(label: "securityProfileName", location: .uri(locationName: "securityProfileName"))
        ]

        /// The maximum number of results to return at one time.
        public let maxResults: Int?
        /// The token for the next set of results.
        public let nextToken: String?
        /// The security profile.
        public let securityProfileName: String

        public init(maxResults: Int? = nil, nextToken: String? = nil, securityProfileName: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.securityProfileName = securityProfileName
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, max: 128)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, min: 1)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListTargetsForSecurityProfileResponse: AWSDecodableShape {
        /// A token that can be used to retrieve the next set of results, or null if there are no additional results.
        public let nextToken: String?
        /// The thing groups to which the security profile is attached.
        public let securityProfileTargets: [SecurityProfileTarget]?

        public init(nextToken: String? = nil, securityProfileTargets: [SecurityProfileTarget]? = nil) {
            self.nextToken = nextToken
            self.securityProfileTargets = securityProfileTargets
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case securityProfileTargets
        }
    }

    public struct ListThingGroupsForThingRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken")),
            AWSMemberEncoding(label: "thingName", location: .uri(locationName: "thingName"))
        ]

        /// The maximum number of results to return at one time.
        public let maxResults: Int?
        /// To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.
        public let nextToken: String?
        /// The thing name.
        public let thingName: String

        public init(maxResults: Int? = nil, nextToken: String? = nil, thingName: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.thingName = thingName
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListThingGroupsForThingResponse: AWSDecodableShape {
        /// The token to use to get the next set of results, or null if there are no additional results.
        public let nextToken: String?
        /// The thing groups.
        public let thingGroups: [GroupNameAndArn]?

        public init(nextToken: String? = nil, thingGroups: [GroupNameAndArn]? = nil) {
            self.nextToken = nextToken
            self.thingGroups = thingGroups
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case thingGroups
        }
    }

    public struct ListThingGroupsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "namePrefixFilter", location: .querystring(locationName: "namePrefixFilter")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken")),
            AWSMemberEncoding(label: "parentGroup", location: .querystring(locationName: "parentGroup")),
            AWSMemberEncoding(label: "recursive", location: .querystring(locationName: "recursive"))
        ]

        /// The maximum number of results to return at one time.
        public let maxResults: Int?
        /// A filter that limits the results to those with the specified name prefix.
        public let namePrefixFilter: String?
        /// To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.
        public let nextToken: String?
        /// A filter that limits the results to those with the specified parent group.
        public let parentGroup: String?
        /// If true, return child groups as well.
        public let recursive: Bool?

        public init(maxResults: Int? = nil, namePrefixFilter: String? = nil, nextToken: String? = nil, parentGroup: String? = nil, recursive: Bool? = nil) {
            self.maxResults = maxResults
            self.namePrefixFilter = namePrefixFilter
            self.nextToken = nextToken
            self.parentGroup = parentGroup
            self.recursive = recursive
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.namePrefixFilter, name: "namePrefixFilter", parent: name, max: 128)
            try self.validate(self.namePrefixFilter, name: "namePrefixFilter", parent: name, min: 1)
            try self.validate(self.namePrefixFilter, name: "namePrefixFilter", parent: name, pattern: "[a-zA-Z0-9:_-]+")
            try self.validate(self.parentGroup, name: "parentGroup", parent: name, max: 128)
            try self.validate(self.parentGroup, name: "parentGroup", parent: name, min: 1)
            try self.validate(self.parentGroup, name: "parentGroup", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListThingGroupsResponse: AWSDecodableShape {
        /// The token to use to get the next set of results. Will not be returned if operation has returned all results.
        public let nextToken: String?
        /// The thing groups.
        public let thingGroups: [GroupNameAndArn]?

        public init(nextToken: String? = nil, thingGroups: [GroupNameAndArn]? = nil) {
            self.nextToken = nextToken
            self.thingGroups = thingGroups
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case thingGroups
        }
    }

    public struct ListThingPrincipalsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken")),
            AWSMemberEncoding(label: "thingName", location: .uri(locationName: "thingName"))
        ]

        /// The maximum number of results to return in this operation.
        public let maxResults: Int?
        /// To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.
        public let nextToken: String?
        /// The name of the thing.
        public let thingName: String

        public init(maxResults: Int? = nil, nextToken: String? = nil, thingName: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.thingName = thingName
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListThingPrincipalsResponse: AWSDecodableShape {
        /// The token to use to get the next set of results, or null if there are no additional results.
        public let nextToken: String?
        /// The principals associated with the thing.
        public let principals: [String]?

        public init(nextToken: String? = nil, principals: [String]? = nil) {
            self.nextToken = nextToken
            self.principals = principals
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case principals
        }
    }

    public struct ListThingRegistrationTaskReportsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken")),
            AWSMemberEncoding(label: "reportType", location: .querystring(locationName: "reportType")),
            AWSMemberEncoding(label: "taskId", location: .uri(locationName: "taskId"))
        ]

        /// The maximum number of results to return per request.
        public let maxResults: Int?
        /// To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.
        public let nextToken: String?
        /// The type of task report.
        public let reportType: ReportType
        /// The id of the task.
        public let taskId: String

        public init(maxResults: Int? = nil, nextToken: String? = nil, reportType: ReportType, taskId: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.reportType = reportType
            self.taskId = taskId
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.taskId, name: "taskId", parent: name, max: 40)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListThingRegistrationTaskReportsResponse: AWSDecodableShape {
        /// The token to use to get the next set of results, or null if there are no additional results.
        public let nextToken: String?
        /// The type of task report.
        public let reportType: ReportType?
        /// Links to the task resources.
        public let resourceLinks: [String]?

        public init(nextToken: String? = nil, reportType: ReportType? = nil, resourceLinks: [String]? = nil) {
            self.nextToken = nextToken
            self.reportType = reportType
            self.resourceLinks = resourceLinks
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case reportType
            case resourceLinks
        }
    }

    public struct ListThingRegistrationTasksRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken")),
            AWSMemberEncoding(label: "status", location: .querystring(locationName: "status"))
        ]

        /// The maximum number of results to return at one time.
        public let maxResults: Int?
        /// To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.
        public let nextToken: String?
        /// The status of the bulk thing provisioning task.
        public let status: Status?

        public init(maxResults: Int? = nil, nextToken: String? = nil, status: Status? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.status = status
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListThingRegistrationTasksResponse: AWSDecodableShape {
        /// The token to use to get the next set of results, or null if there are no additional results.
        public let nextToken: String?
        /// A list of bulk thing provisioning task IDs.
        public let taskIds: [String]?

        public init(nextToken: String? = nil, taskIds: [String]? = nil) {
            self.nextToken = nextToken
            self.taskIds = taskIds
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case taskIds
        }
    }

    public struct ListThingTypesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken")),
            AWSMemberEncoding(label: "thingTypeName", location: .querystring(locationName: "thingTypeName"))
        ]

        /// The maximum number of results to return in this operation.
        public let maxResults: Int?
        /// To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.
        public let nextToken: String?
        /// The name of the thing type.
        public let thingTypeName: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil, thingTypeName: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.thingTypeName = thingTypeName
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, max: 128)
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, min: 1)
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListThingTypesResponse: AWSDecodableShape {
        /// The token for the next set of results. Will not be returned if operation has returned all results.
        public let nextToken: String?
        /// The thing types.
        public let thingTypes: [ThingTypeDefinition]?

        public init(nextToken: String? = nil, thingTypes: [ThingTypeDefinition]? = nil) {
            self.nextToken = nextToken
            self.thingTypes = thingTypes
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case thingTypes
        }
    }

    public struct ListThingsInBillingGroupRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "billingGroupName", location: .uri(locationName: "billingGroupName")),
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken"))
        ]

        /// The name of the billing group.
        public let billingGroupName: String
        /// The maximum number of results to return per request.
        public let maxResults: Int?
        /// To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.
        public let nextToken: String?

        public init(billingGroupName: String, maxResults: Int? = nil, nextToken: String? = nil) {
            self.billingGroupName = billingGroupName
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, max: 128)
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, min: 1)
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListThingsInBillingGroupResponse: AWSDecodableShape {
        /// The token to use to get the next set of results. Will not be returned if operation has returned all results.
        public let nextToken: String?
        /// A list of things in the billing group.
        public let things: [String]?

        public init(nextToken: String? = nil, things: [String]? = nil) {
            self.nextToken = nextToken
            self.things = things
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case things
        }
    }

    public struct ListThingsInThingGroupRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken")),
            AWSMemberEncoding(label: "recursive", location: .querystring(locationName: "recursive")),
            AWSMemberEncoding(label: "thingGroupName", location: .uri(locationName: "thingGroupName"))
        ]

        /// The maximum number of results to return at one time.
        public let maxResults: Int?
        /// To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.
        public let nextToken: String?
        /// When true, list things in this thing group and in all child groups as well.
        public let recursive: Bool?
        /// The thing group name.
        public let thingGroupName: String

        public init(maxResults: Int? = nil, nextToken: String? = nil, recursive: Bool? = nil, thingGroupName: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.recursive = recursive
            self.thingGroupName = thingGroupName
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, max: 128)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, min: 1)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListThingsInThingGroupResponse: AWSDecodableShape {
        /// The token to use to get the next set of results, or null if there are no additional results.
        public let nextToken: String?
        /// The things in the specified thing group.
        public let things: [String]?

        public init(nextToken: String? = nil, things: [String]? = nil) {
            self.nextToken = nextToken
            self.things = things
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case things
        }
    }

    public struct ListThingsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "attributeName", location: .querystring(locationName: "attributeName")),
            AWSMemberEncoding(label: "attributeValue", location: .querystring(locationName: "attributeValue")),
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken")),
            AWSMemberEncoding(label: "thingTypeName", location: .querystring(locationName: "thingTypeName"))
        ]

        /// The attribute name used to search for things.
        public let attributeName: String?
        /// The attribute value used to search for things.
        public let attributeValue: String?
        /// The maximum number of results to return in this operation.
        public let maxResults: Int?
        /// To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.
        public let nextToken: String?
        /// The name of the thing type used to search for things.
        public let thingTypeName: String?

        public init(attributeName: String? = nil, attributeValue: String? = nil, maxResults: Int? = nil, nextToken: String? = nil, thingTypeName: String? = nil) {
            self.attributeName = attributeName
            self.attributeValue = attributeValue
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.thingTypeName = thingTypeName
        }

        public func validate(name: String) throws {
            try self.validate(self.attributeName, name: "attributeName", parent: name, max: 128)
            try self.validate(self.attributeName, name: "attributeName", parent: name, pattern: "[a-zA-Z0-9_.,@/:#-]+")
            try self.validate(self.attributeValue, name: "attributeValue", parent: name, max: 800)
            try self.validate(self.attributeValue, name: "attributeValue", parent: name, pattern: "[a-zA-Z0-9_.,@/:#-]*")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, max: 128)
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, min: 1)
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListThingsResponse: AWSDecodableShape {
        /// The token to use to get the next set of results. Will not be returned if operation has returned all results.
        public let nextToken: String?
        /// The things.
        public let things: [ThingAttribute]?

        public init(nextToken: String? = nil, things: [ThingAttribute]? = nil) {
            self.nextToken = nextToken
            self.things = things
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case things
        }
    }

    public struct ListTopicRuleDestinationsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken"))
        ]

        /// The maximum number of results to return at one time.
        public let maxResults: Int?
        /// To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.
        public let nextToken: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 1000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListTopicRuleDestinationsResponse: AWSDecodableShape {
        /// Information about a topic rule destination.
        public let destinationSummaries: [TopicRuleDestinationSummary]?
        /// The token to use to get the next set of results, or null if there are no additional results.
        public let nextToken: String?

        public init(destinationSummaries: [TopicRuleDestinationSummary]? = nil, nextToken: String? = nil) {
            self.destinationSummaries = destinationSummaries
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case destinationSummaries
            case nextToken
        }
    }

    public struct ListTopicRulesRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken")),
            AWSMemberEncoding(label: "ruleDisabled", location: .querystring(locationName: "ruleDisabled")),
            AWSMemberEncoding(label: "topic", location: .querystring(locationName: "topic"))
        ]

        /// The maximum number of results to return.
        public let maxResults: Int?
        /// To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.
        public let nextToken: String?
        /// Specifies whether the rule is disabled.
        public let ruleDisabled: Bool?
        /// The topic.
        public let topic: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil, ruleDisabled: Bool? = nil, topic: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.ruleDisabled = ruleDisabled
            self.topic = topic
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 10000)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListTopicRulesResponse: AWSDecodableShape {
        /// The token to use to get the next set of results, or null if there are no additional results.
        public let nextToken: String?
        /// The rules.
        public let rules: [TopicRuleListItem]?

        public init(nextToken: String? = nil, rules: [TopicRuleListItem]? = nil) {
            self.nextToken = nextToken
            self.rules = rules
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case rules
        }
    }

    public struct ListV2LoggingLevelsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken")),
            AWSMemberEncoding(label: "targetType", location: .querystring(locationName: "targetType"))
        ]

        /// The maximum number of results to return at one time.
        public let maxResults: Int?
        /// To retrieve the next set of results, the nextToken value from a previous response; otherwise null to receive the first set of results.
        public let nextToken: String?
        /// The type of resource for which you are configuring logging. Must be THING_Group.
        public let targetType: LogTargetType?

        public init(maxResults: Int? = nil, nextToken: String? = nil, targetType: LogTargetType? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.targetType = targetType
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListV2LoggingLevelsResponse: AWSDecodableShape {
        /// The logging configuration for a target.
        public let logTargetConfigurations: [LogTargetConfiguration]?
        /// The token to use to get the next set of results, or null if there are no additional results.
        public let nextToken: String?

        public init(logTargetConfigurations: [LogTargetConfiguration]? = nil, nextToken: String? = nil) {
            self.logTargetConfigurations = logTargetConfigurations
            self.nextToken = nextToken
        }

        private enum CodingKeys: String, CodingKey {
            case logTargetConfigurations
            case nextToken
        }
    }

    public struct ListViolationEventsRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "behaviorCriteriaType", location: .querystring(locationName: "behaviorCriteriaType")),
            AWSMemberEncoding(label: "endTime", location: .querystring(locationName: "endTime")),
            AWSMemberEncoding(label: "listSuppressedAlerts", location: .querystring(locationName: "listSuppressedAlerts")),
            AWSMemberEncoding(label: "maxResults", location: .querystring(locationName: "maxResults")),
            AWSMemberEncoding(label: "nextToken", location: .querystring(locationName: "nextToken")),
            AWSMemberEncoding(label: "securityProfileName", location: .querystring(locationName: "securityProfileName")),
            AWSMemberEncoding(label: "startTime", location: .querystring(locationName: "startTime")),
            AWSMemberEncoding(label: "thingName", location: .querystring(locationName: "thingName"))
        ]

        ///  The criteria for a behavior.
        public let behaviorCriteriaType: BehaviorCriteriaType?
        /// The end time for the alerts to be listed.
        public let endTime: Date
        ///  A list of all suppressed alerts.
        public let listSuppressedAlerts: Bool?
        /// The maximum number of results to return at one time.
        public let maxResults: Int?
        /// The token for the next set of results.
        public let nextToken: String?
        /// A filter to limit results to those alerts generated by the specified security profile.
        public let securityProfileName: String?
        /// The start time for the alerts to be listed.
        public let startTime: Date
        /// A filter to limit results to those alerts caused by the specified thing.
        public let thingName: String?

        public init(behaviorCriteriaType: BehaviorCriteriaType? = nil, endTime: Date, listSuppressedAlerts: Bool? = nil, maxResults: Int? = nil, nextToken: String? = nil, securityProfileName: String? = nil, startTime: Date, thingName: String? = nil) {
            self.behaviorCriteriaType = behaviorCriteriaType
            self.endTime = endTime
            self.listSuppressedAlerts = listSuppressedAlerts
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.securityProfileName = securityProfileName
            self.startTime = startTime
            self.thingName = thingName
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 250)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, max: 128)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, min: 1)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct ListViolationEventsResponse: AWSDecodableShape {
        /// A token that can be used to retrieve the next set of results, or null if there are no additional results.
        public let nextToken: String?
        /// The security profile violation alerts issued for this account during the given time period, potentially filtered by security profile, behavior violated, or thing (device) violating.
        public let violationEvents: [ViolationEvent]?

        public init(nextToken: String? = nil, violationEvents: [ViolationEvent]? = nil) {
            self.nextToken = nextToken
            self.violationEvents = violationEvents
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case violationEvents
        }
    }

    public struct LogTarget: AWSEncodableShape & AWSDecodableShape {
        /// The target name.
        public let targetName: String?
        /// The target type.
        public let targetType: LogTargetType

        public init(targetName: String? = nil, targetType: LogTargetType) {
            self.targetName = targetName
            self.targetType = targetType
        }

        private enum CodingKeys: String, CodingKey {
            case targetName
            case targetType
        }
    }

    public struct LogTargetConfiguration: AWSDecodableShape {
        /// The logging level.
        public let logLevel: LogLevel?
        /// A log target
        public let logTarget: LogTarget?

        public init(logLevel: LogLevel? = nil, logTarget: LogTarget? = nil) {
            self.logLevel = logLevel
            self.logTarget = logTarget
        }

        private enum CodingKeys: String, CodingKey {
            case logLevel
            case logTarget
        }
    }

    public struct LoggingOptionsPayload: AWSEncodableShape {
        /// The log level.
        public let logLevel: LogLevel?
        /// The ARN of the IAM role that grants access.
        public let roleArn: String

        public init(logLevel: LogLevel? = nil, roleArn: String) {
            self.logLevel = logLevel
            self.roleArn = roleArn
        }

        private enum CodingKeys: String, CodingKey {
            case logLevel
            case roleArn
        }
    }

    public struct MachineLearningDetectionConfig: AWSEncodableShape & AWSDecodableShape {
        ///  The sensitivity of anomalous behavior evaluation. Can be Low, Medium, or High.
        public let confidenceLevel: ConfidenceLevel

        public init(confidenceLevel: ConfidenceLevel) {
            self.confidenceLevel = confidenceLevel
        }

        private enum CodingKeys: String, CodingKey {
            case confidenceLevel
        }
    }

    public struct MetricDimension: AWSEncodableShape & AWSDecodableShape {
        /// A unique identifier for the dimension.
        public let dimensionName: String
        /// Defines how the dimensionValues of a dimension are interpreted. For example, for dimension type TOPIC_FILTER, the IN operator, a message will be counted only if its topic matches one of the topic filters. With NOT_IN operator, a message will be counted only if it doesn't match any of the topic filters. The operator is optional: if it's not provided (is null), it will be interpreted as IN.
        public let `operator`: DimensionValueOperator?

        public init(dimensionName: String, operator: DimensionValueOperator? = nil) {
            self.dimensionName = dimensionName
            self.`operator` = `operator`
        }

        public func validate(name: String) throws {
            try self.validate(self.dimensionName, name: "dimensionName", parent: name, max: 128)
            try self.validate(self.dimensionName, name: "dimensionName", parent: name, min: 1)
            try self.validate(self.dimensionName, name: "dimensionName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case dimensionName
            case `operator`
        }
    }

    public struct MetricToRetain: AWSEncodableShape & AWSDecodableShape {
        /// What is measured by the behavior.
        public let metric: String
        /// The dimension of a metric. This can't be used with custom metrics.
        public let metricDimension: MetricDimension?

        public init(metric: String, metricDimension: MetricDimension? = nil) {
            self.metric = metric
            self.metricDimension = metricDimension
        }

        public func validate(name: String) throws {
            try self.metricDimension?.validate(name: "\(name).metricDimension")
        }

        private enum CodingKeys: String, CodingKey {
            case metric
            case metricDimension
        }
    }

    public struct MetricValue: AWSEncodableShape & AWSDecodableShape {
        /// If the comparisonOperator calls for a set of CIDRs, use this to specify that set to be compared with the metric.
        public let cidrs: [String]?
        /// If the comparisonOperator calls for a numeric value, use this to specify that numeric value to be compared with the metric.
        public let count: Int64?
        ///  The numeral value of a metric.
        public let number: Double?
        ///  The numeral values of a metric.
        public let numbers: [Double]?
        /// If the comparisonOperator calls for a set of ports, use this to specify that set to be compared with the metric.
        public let ports: [Int]?
        ///  The string values of a metric.
        public let strings: [String]?

        public init(cidrs: [String]? = nil, count: Int64? = nil, number: Double? = nil, numbers: [Double]? = nil, ports: [Int]? = nil, strings: [String]? = nil) {
            self.cidrs = cidrs
            self.count = count
            self.number = number
            self.numbers = numbers
            self.ports = ports
            self.strings = strings
        }

        public func validate(name: String) throws {
            try self.cidrs?.forEach {
                try validate($0, name: "cidrs[]", parent: name, max: 43)
                try validate($0, name: "cidrs[]", parent: name, min: 2)
                try validate($0, name: "cidrs[]", parent: name, pattern: "[a-fA-F0-9:\\.\\/]+")
            }
            try self.validate(self.count, name: "count", parent: name, min: 0)
            try self.ports?.forEach {
                try validate($0, name: "ports[]", parent: name, max: 65535)
                try validate($0, name: "ports[]", parent: name, min: 0)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case cidrs
            case count
            case number
            case numbers
            case ports
            case strings
        }
    }

    public struct MitigationAction: AWSDecodableShape {
        /// The set of parameters for this mitigation action. The parameters vary, depending on the kind of action you apply.
        public let actionParams: MitigationActionParams?
        /// A unique identifier for the mitigation action.
        public let id: String?
        /// A user-friendly name for the mitigation action.
        public let name: String?
        /// The IAM role ARN used to apply this mitigation action.
        public let roleArn: String?

        public init(actionParams: MitigationActionParams? = nil, id: String? = nil, name: String? = nil, roleArn: String? = nil) {
            self.actionParams = actionParams
            self.id = id
            self.name = name
            self.roleArn = roleArn
        }

        private enum CodingKeys: String, CodingKey {
            case actionParams
            case id
            case name
            case roleArn
        }
    }

    public struct MitigationActionIdentifier: AWSDecodableShape {
        /// The IAM role ARN used to apply this mitigation action.
        public let actionArn: String?
        /// The friendly name of the mitigation action.
        public let actionName: String?
        /// The date when this mitigation action was created.
        public let creationDate: Date?

        public init(actionArn: String? = nil, actionName: String? = nil, creationDate: Date? = nil) {
            self.actionArn = actionArn
            self.actionName = actionName
            self.creationDate = creationDate
        }

        private enum CodingKeys: String, CodingKey {
            case actionArn
            case actionName
            case creationDate
        }
    }

    public struct MitigationActionParams: AWSEncodableShape & AWSDecodableShape {
        /// Parameters to define a mitigation action that moves devices associated with a certificate to one or more specified thing groups, typically for quarantine.
        public let addThingsToThingGroupParams: AddThingsToThingGroupParams?
        /// Parameters to define a mitigation action that enables AWS IoT logging at a specified level of detail.
        public let enableIoTLoggingParams: EnableIoTLoggingParams?
        /// Parameters to define a mitigation action that publishes findings to Amazon Simple Notification Service (Amazon SNS. You can implement your own custom actions in response to the Amazon SNS messages.
        public let publishFindingToSnsParams: PublishFindingToSnsParams?
        /// Parameters to define a mitigation action that adds a blank policy to restrict permissions.
        public let replaceDefaultPolicyVersionParams: ReplaceDefaultPolicyVersionParams?
        /// Parameters to define a mitigation action that changes the state of the CA certificate to inactive.
        public let updateCACertificateParams: UpdateCACertificateParams?
        /// Parameters to define a mitigation action that changes the state of the device certificate to inactive.
        public let updateDeviceCertificateParams: UpdateDeviceCertificateParams?

        public init(addThingsToThingGroupParams: AddThingsToThingGroupParams? = nil, enableIoTLoggingParams: EnableIoTLoggingParams? = nil, publishFindingToSnsParams: PublishFindingToSnsParams? = nil, replaceDefaultPolicyVersionParams: ReplaceDefaultPolicyVersionParams? = nil, updateCACertificateParams: UpdateCACertificateParams? = nil, updateDeviceCertificateParams: UpdateDeviceCertificateParams? = nil) {
            self.addThingsToThingGroupParams = addThingsToThingGroupParams
            self.enableIoTLoggingParams = enableIoTLoggingParams
            self.publishFindingToSnsParams = publishFindingToSnsParams
            self.replaceDefaultPolicyVersionParams = replaceDefaultPolicyVersionParams
            self.updateCACertificateParams = updateCACertificateParams
            self.updateDeviceCertificateParams = updateDeviceCertificateParams
        }

        public func validate(name: String) throws {
            try self.addThingsToThingGroupParams?.validate(name: "\(name).addThingsToThingGroupParams")
            try self.enableIoTLoggingParams?.validate(name: "\(name).enableIoTLoggingParams")
            try self.publishFindingToSnsParams?.validate(name: "\(name).publishFindingToSnsParams")
        }

        private enum CodingKeys: String, CodingKey {
            case addThingsToThingGroupParams
            case enableIoTLoggingParams
            case publishFindingToSnsParams
            case replaceDefaultPolicyVersionParams
            case updateCACertificateParams
            case updateDeviceCertificateParams
        }
    }

    public struct MqttContext: AWSEncodableShape {
        /// The value of the clientId key in an MQTT authorization request.
        public let clientId: String?
        /// The value of the password key in an MQTT authorization request.
        public let password: Data?
        /// The value of the username key in an MQTT authorization request.
        public let username: String?

        public init(clientId: String? = nil, password: Data? = nil, username: String? = nil) {
            self.clientId = clientId
            self.password = password
            self.username = username
        }

        public func validate(name: String) throws {
            try self.validate(self.clientId, name: "clientId", parent: name, max: 65535)
            try self.validate(self.clientId, name: "clientId", parent: name, min: 1)
            try self.validate(self.password, name: "password", parent: name, max: 65535)
            try self.validate(self.password, name: "password", parent: name, min: 1)
            try self.validate(self.username, name: "username", parent: name, max: 65535)
            try self.validate(self.username, name: "username", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case clientId
            case password
            case username
        }
    }

    public struct NonCompliantResource: AWSDecodableShape {
        /// Other information about the noncompliant resource.
        public let additionalInfo: [String: String]?
        /// Information that identifies the noncompliant resource.
        public let resourceIdentifier: ResourceIdentifier?
        /// The type of the noncompliant resource.
        public let resourceType: ResourceType?

        public init(additionalInfo: [String: String]? = nil, resourceIdentifier: ResourceIdentifier? = nil, resourceType: ResourceType? = nil) {
            self.additionalInfo = additionalInfo
            self.resourceIdentifier = resourceIdentifier
            self.resourceType = resourceType
        }

        private enum CodingKeys: String, CodingKey {
            case additionalInfo
            case resourceIdentifier
            case resourceType
        }
    }

    public struct OTAUpdateFile: AWSEncodableShape & AWSDecodableShape {
        /// A list of name/attribute pairs.
        public let attributes: [String: String]?
        /// The code signing method of the file.
        public let codeSigning: CodeSigning?
        /// The location of the updated firmware.
        public let fileLocation: FileLocation?
        /// The name of the file.
        public let fileName: String?
        /// An integer value you can include in the job document to allow your devices to identify the type of file received from the cloud.
        public let fileType: Int?
        /// The file version.
        public let fileVersion: String?

        public init(attributes: [String: String]? = nil, codeSigning: CodeSigning? = nil, fileLocation: FileLocation? = nil, fileName: String? = nil, fileType: Int? = nil, fileVersion: String? = nil) {
            self.attributes = attributes
            self.codeSigning = codeSigning
            self.fileLocation = fileLocation
            self.fileName = fileName
            self.fileType = fileType
            self.fileVersion = fileVersion
        }

        public func validate(name: String) throws {
            try self.codeSigning?.validate(name: "\(name).codeSigning")
            try self.fileLocation?.validate(name: "\(name).fileLocation")
            try self.validate(self.fileType, name: "fileType", parent: name, max: 255)
            try self.validate(self.fileType, name: "fileType", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case attributes
            case codeSigning
            case fileLocation
            case fileName
            case fileType
            case fileVersion
        }
    }

    public struct OTAUpdateInfo: AWSDecodableShape {
        /// A collection of name/value pairs
        public let additionalParameters: [String: String]?
        /// The AWS IoT job ARN associated with the OTA update.
        public let awsIotJobArn: String?
        /// The AWS IoT job ID associated with the OTA update.
        public let awsIotJobId: String?
        /// Configuration for the rollout of OTA updates.
        public let awsJobExecutionsRolloutConfig: AwsJobExecutionsRolloutConfig?
        /// Configuration information for pre-signed URLs. Valid when protocols contains HTTP.
        public let awsJobPresignedUrlConfig: AwsJobPresignedUrlConfig?
        /// The date when the OTA update was created.
        public let creationDate: Date?
        /// A description of the OTA update.
        public let description: String?
        /// Error information associated with the OTA update.
        public let errorInfo: ErrorInfo?
        /// The date when the OTA update was last updated.
        public let lastModifiedDate: Date?
        /// The OTA update ARN.
        public let otaUpdateArn: String?
        /// A list of files associated with the OTA update.
        public let otaUpdateFiles: [OTAUpdateFile]?
        /// The OTA update ID.
        public let otaUpdateId: String?
        /// The status of the OTA update.
        public let otaUpdateStatus: OTAUpdateStatus?
        /// The protocol used to transfer the OTA update image. Valid values are [HTTP], [MQTT], [HTTP, MQTT]. When both HTTP and MQTT are specified, the target device can choose the protocol.
        public let protocols: [Protocol]?
        /// The targets of the OTA update.
        public let targets: [String]?
        /// Specifies whether the OTA update will continue to run (CONTINUOUS), or will be complete after all those things specified as targets have completed the OTA update (SNAPSHOT). If continuous, the OTA update may also be run on a thing when a change is detected in a target. For example, an OTA update will run on a thing when the thing is added to a target group, even after the OTA update was completed by all things originally in the group.
        public let targetSelection: TargetSelection?

        public init(additionalParameters: [String: String]? = nil, awsIotJobArn: String? = nil, awsIotJobId: String? = nil, awsJobExecutionsRolloutConfig: AwsJobExecutionsRolloutConfig? = nil, awsJobPresignedUrlConfig: AwsJobPresignedUrlConfig? = nil, creationDate: Date? = nil, description: String? = nil, errorInfo: ErrorInfo? = nil, lastModifiedDate: Date? = nil, otaUpdateArn: String? = nil, otaUpdateFiles: [OTAUpdateFile]? = nil, otaUpdateId: String? = nil, otaUpdateStatus: OTAUpdateStatus? = nil, protocols: [Protocol]? = nil, targets: [String]? = nil, targetSelection: TargetSelection? = nil) {
            self.additionalParameters = additionalParameters
            self.awsIotJobArn = awsIotJobArn
            self.awsIotJobId = awsIotJobId
            self.awsJobExecutionsRolloutConfig = awsJobExecutionsRolloutConfig
            self.awsJobPresignedUrlConfig = awsJobPresignedUrlConfig
            self.creationDate = creationDate
            self.description = description
            self.errorInfo = errorInfo
            self.lastModifiedDate = lastModifiedDate
            self.otaUpdateArn = otaUpdateArn
            self.otaUpdateFiles = otaUpdateFiles
            self.otaUpdateId = otaUpdateId
            self.otaUpdateStatus = otaUpdateStatus
            self.protocols = protocols
            self.targets = targets
            self.targetSelection = targetSelection
        }

        private enum CodingKeys: String, CodingKey {
            case additionalParameters
            case awsIotJobArn
            case awsIotJobId
            case awsJobExecutionsRolloutConfig
            case awsJobPresignedUrlConfig
            case creationDate
            case description
            case errorInfo
            case lastModifiedDate
            case otaUpdateArn
            case otaUpdateFiles
            case otaUpdateId
            case otaUpdateStatus
            case protocols
            case targets
            case targetSelection
        }
    }

    public struct OTAUpdateSummary: AWSDecodableShape {
        /// The date when the OTA update was created.
        public let creationDate: Date?
        /// The OTA update ARN.
        public let otaUpdateArn: String?
        /// The OTA update ID.
        public let otaUpdateId: String?

        public init(creationDate: Date? = nil, otaUpdateArn: String? = nil, otaUpdateId: String? = nil) {
            self.creationDate = creationDate
            self.otaUpdateArn = otaUpdateArn
            self.otaUpdateId = otaUpdateId
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate
            case otaUpdateArn
            case otaUpdateId
        }
    }

    public struct OutgoingCertificate: AWSDecodableShape {
        /// The certificate ARN.
        public let certificateArn: String?
        /// The certificate ID.
        public let certificateId: String?
        /// The certificate creation date.
        public let creationDate: Date?
        /// The date the transfer was initiated.
        public let transferDate: Date?
        /// The transfer message.
        public let transferMessage: String?
        /// The AWS account to which the transfer was made.
        public let transferredTo: String?

        public init(certificateArn: String? = nil, certificateId: String? = nil, creationDate: Date? = nil, transferDate: Date? = nil, transferMessage: String? = nil, transferredTo: String? = nil) {
            self.certificateArn = certificateArn
            self.certificateId = certificateId
            self.creationDate = creationDate
            self.transferDate = transferDate
            self.transferMessage = transferMessage
            self.transferredTo = transferredTo
        }

        private enum CodingKeys: String, CodingKey {
            case certificateArn
            case certificateId
            case creationDate
            case transferDate
            case transferMessage
            case transferredTo
        }
    }

    public struct PercentPair: AWSDecodableShape {
        /// The percentile.
        public let percent: Double?
        /// The value of the percentile.
        public let value: Double?

        public init(percent: Double? = nil, value: Double? = nil) {
            self.percent = percent
            self.value = value
        }

        private enum CodingKeys: String, CodingKey {
            case percent
            case value
        }
    }

    public struct Policy: AWSDecodableShape {
        /// The policy ARN.
        public let policyArn: String?
        /// The policy name.
        public let policyName: String?

        public init(policyArn: String? = nil, policyName: String? = nil) {
            self.policyArn = policyArn
            self.policyName = policyName
        }

        private enum CodingKeys: String, CodingKey {
            case policyArn
            case policyName
        }
    }

    public struct PolicyVersion: AWSDecodableShape {
        /// The date and time the policy was created.
        public let createDate: Date?
        /// Specifies whether the policy version is the default.
        public let isDefaultVersion: Bool?
        /// The policy version ID.
        public let versionId: String?

        public init(createDate: Date? = nil, isDefaultVersion: Bool? = nil, versionId: String? = nil) {
            self.createDate = createDate
            self.isDefaultVersion = isDefaultVersion
            self.versionId = versionId
        }

        private enum CodingKeys: String, CodingKey {
            case createDate
            case isDefaultVersion
            case versionId
        }
    }

    public struct PolicyVersionIdentifier: AWSEncodableShape & AWSDecodableShape {
        /// The name of the policy.
        public let policyName: String?
        /// The ID of the version of the policy associated with the resource.
        public let policyVersionId: String?

        public init(policyName: String? = nil, policyVersionId: String? = nil) {
            self.policyName = policyName
            self.policyVersionId = policyVersionId
        }

        public func validate(name: String) throws {
            try self.validate(self.policyName, name: "policyName", parent: name, max: 128)
            try self.validate(self.policyName, name: "policyName", parent: name, min: 1)
            try self.validate(self.policyName, name: "policyName", parent: name, pattern: "[\\w+=,.@-]+")
            try self.validate(self.policyVersionId, name: "policyVersionId", parent: name, pattern: "[0-9]+")
        }

        private enum CodingKeys: String, CodingKey {
            case policyName
            case policyVersionId
        }
    }

    public struct PresignedUrlConfig: AWSEncodableShape & AWSDecodableShape {
        /// How long (in seconds) pre-signed URLs are valid. Valid values are 60 - 3600, the default value is 3600 seconds. Pre-signed URLs are generated when Jobs receives an MQTT request for the job document.
        public let expiresInSec: Int64?
        /// The ARN of an IAM role that grants grants permission to download files from the S3 bucket where the job data/updates are stored. The role must also grant permission for IoT to download the files.
        public let roleArn: String?

        public init(expiresInSec: Int64? = nil, roleArn: String? = nil) {
            self.expiresInSec = expiresInSec
            self.roleArn = roleArn
        }

        public func validate(name: String) throws {
            try self.validate(self.expiresInSec, name: "expiresInSec", parent: name, max: 3600)
            try self.validate(self.expiresInSec, name: "expiresInSec", parent: name, min: 60)
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 20)
        }

        private enum CodingKeys: String, CodingKey {
            case expiresInSec
            case roleArn
        }
    }

    public struct ProvisioningHook: AWSEncodableShape & AWSDecodableShape {
        /// The payload that was sent to the target function.  Note: Only Lambda functions are currently supported.
        public let payloadVersion: String?
        /// The ARN of the target function.  Note: Only Lambda functions are currently supported.
        public let targetArn: String

        public init(payloadVersion: String? = nil, targetArn: String) {
            self.payloadVersion = payloadVersion
            self.targetArn = targetArn
        }

        public func validate(name: String) throws {
            try self.validate(self.payloadVersion, name: "payloadVersion", parent: name, max: 32)
            try self.validate(self.payloadVersion, name: "payloadVersion", parent: name, min: 10)
            try self.validate(self.payloadVersion, name: "payloadVersion", parent: name, pattern: "^[0-9-]+$")
            try self.validate(self.targetArn, name: "targetArn", parent: name, max: 2048)
        }

        private enum CodingKeys: String, CodingKey {
            case payloadVersion
            case targetArn
        }
    }

    public struct ProvisioningTemplateSummary: AWSDecodableShape {
        /// The date when the fleet provisioning template summary was created.
        public let creationDate: Date?
        /// The description of the fleet provisioning template.
        public let description: String?
        /// True if the fleet provision template is enabled, otherwise false.
        public let enabled: Bool?
        /// The date when the fleet provisioning template summary was last modified.
        public let lastModifiedDate: Date?
        /// The ARN of the fleet provisioning template.
        public let templateArn: String?
        /// The name of the fleet provisioning template.
        public let templateName: String?

        public init(creationDate: Date? = nil, description: String? = nil, enabled: Bool? = nil, lastModifiedDate: Date? = nil, templateArn: String? = nil, templateName: String? = nil) {
            self.creationDate = creationDate
            self.description = description
            self.enabled = enabled
            self.lastModifiedDate = lastModifiedDate
            self.templateArn = templateArn
            self.templateName = templateName
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate
            case description
            case enabled
            case lastModifiedDate
            case templateArn
            case templateName
        }
    }

    public struct ProvisioningTemplateVersionSummary: AWSDecodableShape {
        /// The date when the fleet provisioning template version was created
        public let creationDate: Date?
        /// True if the fleet provisioning template version is the default version, otherwise false.
        public let isDefaultVersion: Bool?
        /// The ID of the fleet privisioning template version.
        public let versionId: Int?

        public init(creationDate: Date? = nil, isDefaultVersion: Bool? = nil, versionId: Int? = nil) {
            self.creationDate = creationDate
            self.isDefaultVersion = isDefaultVersion
            self.versionId = versionId
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate
            case isDefaultVersion
            case versionId
        }
    }

    public struct PublishFindingToSnsParams: AWSEncodableShape & AWSDecodableShape {
        /// The ARN of the topic to which you want to publish the findings.
        public let topicArn: String

        public init(topicArn: String) {
            self.topicArn = topicArn
        }

        public func validate(name: String) throws {
            try self.validate(self.topicArn, name: "topicArn", parent: name, max: 350)
        }

        private enum CodingKeys: String, CodingKey {
            case topicArn
        }
    }

    public struct PutAssetPropertyValueEntry: AWSEncodableShape & AWSDecodableShape {
        /// The ID of the AWS IoT SiteWise asset. You must specify either a propertyAlias or both an aliasId and a propertyId. Accepts substitution templates.
        public let assetId: String?
        /// Optional. A unique identifier for this entry that you can define to better track which message caused an error in case of failure. Accepts substitution templates. Defaults to a new UUID.
        public let entryId: String?
        /// The name of the property alias associated with your asset property. You must specify either a propertyAlias or both an aliasId and a propertyId. Accepts substitution templates.
        public let propertyAlias: String?
        /// The ID of the asset's property. You must specify either a propertyAlias or both an aliasId and a propertyId. Accepts substitution templates.
        public let propertyId: String?
        /// A list of property values to insert that each contain timestamp, quality, and value (TQV) information.
        public let propertyValues: [AssetPropertyValue]

        public init(assetId: String? = nil, entryId: String? = nil, propertyAlias: String? = nil, propertyId: String? = nil, propertyValues: [AssetPropertyValue]) {
            self.assetId = assetId
            self.entryId = entryId
            self.propertyAlias = propertyAlias
            self.propertyId = propertyId
            self.propertyValues = propertyValues
        }

        public func validate(name: String) throws {
            try self.validate(self.propertyAlias, name: "propertyAlias", parent: name, min: 1)
            try self.propertyValues.forEach {
                try $0.validate(name: "\(name).propertyValues[]")
            }
            try self.validate(self.propertyValues, name: "propertyValues", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case assetId
            case entryId
            case propertyAlias
            case propertyId
            case propertyValues
        }
    }

    public struct PutItemInput: AWSEncodableShape & AWSDecodableShape {
        /// The table where the message data will be written.
        public let tableName: String

        public init(tableName: String) {
            self.tableName = tableName
        }

        private enum CodingKeys: String, CodingKey {
            case tableName
        }
    }

    public struct RateIncreaseCriteria: AWSEncodableShape & AWSDecodableShape {
        /// The threshold for number of notified things that will initiate the increase in rate of rollout.
        public let numberOfNotifiedThings: Int?
        /// The threshold for number of succeeded things that will initiate the increase in rate of rollout.
        public let numberOfSucceededThings: Int?

        public init(numberOfNotifiedThings: Int? = nil, numberOfSucceededThings: Int? = nil) {
            self.numberOfNotifiedThings = numberOfNotifiedThings
            self.numberOfSucceededThings = numberOfSucceededThings
        }

        public func validate(name: String) throws {
            try self.validate(self.numberOfNotifiedThings, name: "numberOfNotifiedThings", parent: name, min: 1)
            try self.validate(self.numberOfSucceededThings, name: "numberOfSucceededThings", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case numberOfNotifiedThings
            case numberOfSucceededThings
        }
    }

    public struct RegisterCACertificateRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "allowAutoRegistration", location: .querystring(locationName: "allowAutoRegistration")),
            AWSMemberEncoding(label: "setAsActive", location: .querystring(locationName: "setAsActive"))
        ]

        /// Allows this CA certificate to be used for auto registration of device certificates.
        public let allowAutoRegistration: Bool?
        /// The CA certificate.
        public let caCertificate: String
        /// Information about the registration configuration.
        public let registrationConfig: RegistrationConfig?
        /// A boolean value that specifies if the CA certificate is set to active.
        public let setAsActive: Bool?
        /// Metadata which can be used to manage the CA certificate.  For URI Request parameters use format: ...key1=value1&amp;key2=value2... For the CLI command-line parameter use format: &amp;&amp;tags "key1=value1&amp;key2=value2..." For the cli-input-json file use format: "tags": "key1=value1&amp;key2=value2..."
        public let tags: [Tag]?
        /// The private key verification certificate.
        public let verificationCertificate: String

        public init(allowAutoRegistration: Bool? = nil, caCertificate: String, registrationConfig: RegistrationConfig? = nil, setAsActive: Bool? = nil, tags: [Tag]? = nil, verificationCertificate: String) {
            self.allowAutoRegistration = allowAutoRegistration
            self.caCertificate = caCertificate
            self.registrationConfig = registrationConfig
            self.setAsActive = setAsActive
            self.tags = tags
            self.verificationCertificate = verificationCertificate
        }

        public func validate(name: String) throws {
            try self.validate(self.caCertificate, name: "caCertificate", parent: name, max: 65536)
            try self.validate(self.caCertificate, name: "caCertificate", parent: name, min: 1)
            try self.registrationConfig?.validate(name: "\(name).registrationConfig")
            try self.tags?.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
            try self.validate(self.verificationCertificate, name: "verificationCertificate", parent: name, max: 65536)
            try self.validate(self.verificationCertificate, name: "verificationCertificate", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case caCertificate
            case registrationConfig
            case tags
            case verificationCertificate
        }
    }

    public struct RegisterCACertificateResponse: AWSDecodableShape {
        /// The CA certificate ARN.
        public let certificateArn: String?
        /// The CA certificate identifier.
        public let certificateId: String?

        public init(certificateArn: String? = nil, certificateId: String? = nil) {
            self.certificateArn = certificateArn
            self.certificateId = certificateId
        }

        private enum CodingKeys: String, CodingKey {
            case certificateArn
            case certificateId
        }
    }

    public struct RegisterCertificateRequest: AWSEncodableShape {
        /// The CA certificate used to sign the device certificate being registered.
        public let caCertificatePem: String?
        /// The certificate data, in PEM format.
        public let certificatePem: String
        /// The status of the register certificate request.
        public let status: CertificateStatus?

        public init(caCertificatePem: String? = nil, certificatePem: String, status: CertificateStatus? = nil) {
            self.caCertificatePem = caCertificatePem
            self.certificatePem = certificatePem
            self.status = status
        }

        public func validate(name: String) throws {
            try self.validate(self.caCertificatePem, name: "caCertificatePem", parent: name, max: 65536)
            try self.validate(self.caCertificatePem, name: "caCertificatePem", parent: name, min: 1)
            try self.validate(self.certificatePem, name: "certificatePem", parent: name, max: 65536)
            try self.validate(self.certificatePem, name: "certificatePem", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case caCertificatePem
            case certificatePem
            case status
        }
    }

    public struct RegisterCertificateResponse: AWSDecodableShape {
        /// The certificate ARN.
        public let certificateArn: String?
        /// The certificate identifier.
        public let certificateId: String?

        public init(certificateArn: String? = nil, certificateId: String? = nil) {
            self.certificateArn = certificateArn
            self.certificateId = certificateId
        }

        private enum CodingKeys: String, CodingKey {
            case certificateArn
            case certificateId
        }
    }

    public struct RegisterCertificateWithoutCARequest: AWSEncodableShape {
        /// The certificate data, in PEM format.
        public let certificatePem: String
        /// The status of the register certificate request.
        public let status: CertificateStatus?

        public init(certificatePem: String, status: CertificateStatus? = nil) {
            self.certificatePem = certificatePem
            self.status = status
        }

        public func validate(name: String) throws {
            try self.validate(self.certificatePem, name: "certificatePem", parent: name, max: 65536)
            try self.validate(self.certificatePem, name: "certificatePem", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case certificatePem
            case status
        }
    }

    public struct RegisterCertificateWithoutCAResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN) of the registered certificate.
        public let certificateArn: String?
        /// The ID of the registered certificate. (The last part of the certificate ARN contains the certificate ID.
        public let certificateId: String?

        public init(certificateArn: String? = nil, certificateId: String? = nil) {
            self.certificateArn = certificateArn
            self.certificateId = certificateId
        }

        private enum CodingKeys: String, CodingKey {
            case certificateArn
            case certificateId
        }
    }

    public struct RegisterThingRequest: AWSEncodableShape {
        /// The parameters for provisioning a thing. See Provisioning Templates for more information.
        public let parameters: [String: String]?
        /// The provisioning template. See Provisioning Devices That Have Device Certificates for more information.
        public let templateBody: String

        public init(parameters: [String: String]? = nil, templateBody: String) {
            self.parameters = parameters
            self.templateBody = templateBody
        }

        private enum CodingKeys: String, CodingKey {
            case parameters
            case templateBody
        }
    }

    public struct RegisterThingResponse: AWSDecodableShape {
        /// The certificate data, in PEM format.
        public let certificatePem: String?
        /// ARNs for the generated resources.
        public let resourceArns: [String: String]?

        public init(certificatePem: String? = nil, resourceArns: [String: String]? = nil) {
            self.certificatePem = certificatePem
            self.resourceArns = resourceArns
        }

        private enum CodingKeys: String, CodingKey {
            case certificatePem
            case resourceArns
        }
    }

    public struct RegistrationConfig: AWSEncodableShape & AWSDecodableShape {
        /// The ARN of the role.
        public let roleArn: String?
        /// The template body.
        public let templateBody: String?

        public init(roleArn: String? = nil, templateBody: String? = nil) {
            self.roleArn = roleArn
            self.templateBody = templateBody
        }

        public func validate(name: String) throws {
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 20)
        }

        private enum CodingKeys: String, CodingKey {
            case roleArn
            case templateBody
        }
    }

    public struct RejectCertificateTransferRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "certificateId", location: .uri(locationName: "certificateId"))
        ]

        /// The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)
        public let certificateId: String
        /// The reason the certificate transfer was rejected.
        public let rejectReason: String?

        public init(certificateId: String, rejectReason: String? = nil) {
            self.certificateId = certificateId
            self.rejectReason = rejectReason
        }

        public func validate(name: String) throws {
            try self.validate(self.certificateId, name: "certificateId", parent: name, max: 64)
            try self.validate(self.certificateId, name: "certificateId", parent: name, min: 64)
            try self.validate(self.certificateId, name: "certificateId", parent: name, pattern: "(0x)?[a-fA-F0-9]+")
            try self.validate(self.rejectReason, name: "rejectReason", parent: name, max: 128)
        }

        private enum CodingKeys: String, CodingKey {
            case rejectReason
        }
    }

    public struct RelatedResource: AWSDecodableShape {
        /// Other information about the resource.
        public let additionalInfo: [String: String]?
        /// Information that identifies the resource.
        public let resourceIdentifier: ResourceIdentifier?
        /// The type of resource.
        public let resourceType: ResourceType?

        public init(additionalInfo: [String: String]? = nil, resourceIdentifier: ResourceIdentifier? = nil, resourceType: ResourceType? = nil) {
            self.additionalInfo = additionalInfo
            self.resourceIdentifier = resourceIdentifier
            self.resourceType = resourceType
        }

        private enum CodingKeys: String, CodingKey {
            case additionalInfo
            case resourceIdentifier
            case resourceType
        }
    }

    public struct RemoveThingFromBillingGroupRequest: AWSEncodableShape {
        /// The ARN of the billing group.
        public let billingGroupArn: String?
        /// The name of the billing group.
        public let billingGroupName: String?
        /// The ARN of the thing to be removed from the billing group.
        public let thingArn: String?
        /// The name of the thing to be removed from the billing group.
        public let thingName: String?

        public init(billingGroupArn: String? = nil, billingGroupName: String? = nil, thingArn: String? = nil, thingName: String? = nil) {
            self.billingGroupArn = billingGroupArn
            self.billingGroupName = billingGroupName
            self.thingArn = thingArn
            self.thingName = thingName
        }

        public func validate(name: String) throws {
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, max: 128)
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, min: 1)
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case billingGroupArn
            case billingGroupName
            case thingArn
            case thingName
        }
    }

    public struct RemoveThingFromBillingGroupResponse: AWSDecodableShape {
        public init() {}
    }

    public struct RemoveThingFromThingGroupRequest: AWSEncodableShape {
        /// The ARN of the thing to remove from the group.
        public let thingArn: String?
        /// The group ARN.
        public let thingGroupArn: String?
        /// The group name.
        public let thingGroupName: String?
        /// The name of the thing to remove from the group.
        public let thingName: String?

        public init(thingArn: String? = nil, thingGroupArn: String? = nil, thingGroupName: String? = nil, thingName: String? = nil) {
            self.thingArn = thingArn
            self.thingGroupArn = thingGroupArn
            self.thingGroupName = thingGroupName
            self.thingName = thingName
        }

        public func validate(name: String) throws {
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, max: 128)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, min: 1)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case thingArn
            case thingGroupArn
            case thingGroupName
            case thingName
        }
    }

    public struct RemoveThingFromThingGroupResponse: AWSDecodableShape {
        public init() {}
    }

    public struct ReplaceDefaultPolicyVersionParams: AWSEncodableShape & AWSDecodableShape {
        /// The name of the template to be applied. The only supported value is BLANK_POLICY.
        public let templateName: PolicyTemplateName

        public init(templateName: PolicyTemplateName) {
            self.templateName = templateName
        }

        private enum CodingKeys: String, CodingKey {
            case templateName
        }
    }

    public struct ReplaceTopicRuleRequest: AWSEncodableShape & AWSShapeWithPayload {
        /// The key for the payload
        public static let _payloadPath: String = "topicRulePayload"
        public static var _encoding = [
            AWSMemberEncoding(label: "ruleName", location: .uri(locationName: "ruleName"))
        ]

        /// The name of the rule.
        public let ruleName: String
        /// The rule payload.
        public let topicRulePayload: TopicRulePayload

        public init(ruleName: String, topicRulePayload: TopicRulePayload) {
            self.ruleName = ruleName
            self.topicRulePayload = topicRulePayload
        }

        public func validate(name: String) throws {
            try self.validate(self.ruleName, name: "ruleName", parent: name, max: 128)
            try self.validate(self.ruleName, name: "ruleName", parent: name, min: 1)
            try self.validate(self.ruleName, name: "ruleName", parent: name, pattern: "^[a-zA-Z0-9_]+$")
            try self.topicRulePayload.validate(name: "\(name).topicRulePayload")
        }

        private enum CodingKeys: String, CodingKey {
            case topicRulePayload
        }
    }

    public struct RepublishAction: AWSEncodableShape & AWSDecodableShape {
        /// The Quality of Service (QoS) level to use when republishing messages. The default value is 0.
        public let qos: Int?
        /// The ARN of the IAM role that grants access.
        public let roleArn: String
        /// The name of the MQTT topic.
        public let topic: String

        public init(qos: Int? = nil, roleArn: String, topic: String) {
            self.qos = qos
            self.roleArn = roleArn
            self.topic = topic
        }

        public func validate(name: String) throws {
            try self.validate(self.qos, name: "qos", parent: name, max: 1)
            try self.validate(self.qos, name: "qos", parent: name, min: 0)
        }

        private enum CodingKeys: String, CodingKey {
            case qos
            case roleArn
            case topic
        }
    }

    public struct ResourceIdentifier: AWSEncodableShape & AWSDecodableShape {
        /// The account with which the resource is associated.
        public let account: String?
        /// The ID of the CA certificate used to authorize the certificate.
        public let caCertificateId: String?
        /// The client ID.
        public let clientId: String?
        /// The ID of the Amazon Cognito identity pool.
        public let cognitoIdentityPoolId: String?
        /// The ID of the certificate attached to the resource.
        public let deviceCertificateId: String?
        /// The ARN of the IAM role that has overly permissive actions.
        public let iamRoleArn: String?
        /// The version of the policy associated with the resource.
        public let policyVersionIdentifier: PolicyVersionIdentifier?
        /// The ARN of the role alias that has overly permissive actions.
        public let roleAliasArn: String?

        public init(account: String? = nil, caCertificateId: String? = nil, clientId: String? = nil, cognitoIdentityPoolId: String? = nil, deviceCertificateId: String? = nil, iamRoleArn: String? = nil, policyVersionIdentifier: PolicyVersionIdentifier? = nil, roleAliasArn: String? = nil) {
            self.account = account
            self.caCertificateId = caCertificateId
            self.clientId = clientId
            self.cognitoIdentityPoolId = cognitoIdentityPoolId
            self.deviceCertificateId = deviceCertificateId
            self.iamRoleArn = iamRoleArn
            self.policyVersionIdentifier = policyVersionIdentifier
            self.roleAliasArn = roleAliasArn
        }

        public func validate(name: String) throws {
            try self.validate(self.account, name: "account", parent: name, max: 12)
            try self.validate(self.account, name: "account", parent: name, min: 12)
            try self.validate(self.account, name: "account", parent: name, pattern: "[0-9]+")
            try self.validate(self.caCertificateId, name: "caCertificateId", parent: name, max: 64)
            try self.validate(self.caCertificateId, name: "caCertificateId", parent: name, min: 64)
            try self.validate(self.caCertificateId, name: "caCertificateId", parent: name, pattern: "(0x)?[a-fA-F0-9]+")
            try self.validate(self.deviceCertificateId, name: "deviceCertificateId", parent: name, max: 64)
            try self.validate(self.deviceCertificateId, name: "deviceCertificateId", parent: name, min: 64)
            try self.validate(self.deviceCertificateId, name: "deviceCertificateId", parent: name, pattern: "(0x)?[a-fA-F0-9]+")
            try self.validate(self.iamRoleArn, name: "iamRoleArn", parent: name, max: 2048)
            try self.validate(self.iamRoleArn, name: "iamRoleArn", parent: name, min: 20)
            try self.policyVersionIdentifier?.validate(name: "\(name).policyVersionIdentifier")
            try self.validate(self.roleAliasArn, name: "roleAliasArn", parent: name, max: 2048)
            try self.validate(self.roleAliasArn, name: "roleAliasArn", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case account
            case caCertificateId
            case clientId
            case cognitoIdentityPoolId
            case deviceCertificateId
            case iamRoleArn
            case policyVersionIdentifier
            case roleAliasArn
        }
    }

    public struct RoleAliasDescription: AWSDecodableShape {
        /// The UNIX timestamp of when the role alias was created.
        public let creationDate: Date?
        /// The number of seconds for which the credential is valid.
        public let credentialDurationSeconds: Int?
        /// The UNIX timestamp of when the role alias was last modified.
        public let lastModifiedDate: Date?
        /// The role alias owner.
        public let owner: String?
        /// The role alias.
        public let roleAlias: String?
        /// The ARN of the role alias.
        public let roleAliasArn: String?
        /// The role ARN.
        public let roleArn: String?

        public init(creationDate: Date? = nil, credentialDurationSeconds: Int? = nil, lastModifiedDate: Date? = nil, owner: String? = nil, roleAlias: String? = nil, roleAliasArn: String? = nil, roleArn: String? = nil) {
            self.creationDate = creationDate
            self.credentialDurationSeconds = credentialDurationSeconds
            self.lastModifiedDate = lastModifiedDate
            self.owner = owner
            self.roleAlias = roleAlias
            self.roleAliasArn = roleAliasArn
            self.roleArn = roleArn
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate
            case credentialDurationSeconds
            case lastModifiedDate
            case owner
            case roleAlias
            case roleAliasArn
            case roleArn
        }
    }

    public struct S3Action: AWSEncodableShape & AWSDecodableShape {
        /// The Amazon S3 bucket.
        public let bucketName: String
        /// The Amazon S3 canned ACL that controls access to the object identified by the object key. For more information, see S3 canned ACLs.
        public let cannedAcl: CannedAccessControlList?
        /// The object key. For more information, see Actions, resources, and condition keys for Amazon S3.
        public let key: String
        /// The ARN of the IAM role that grants access.
        public let roleArn: String

        public init(bucketName: String, cannedAcl: CannedAccessControlList? = nil, key: String, roleArn: String) {
            self.bucketName = bucketName
            self.cannedAcl = cannedAcl
            self.key = key
            self.roleArn = roleArn
        }

        private enum CodingKeys: String, CodingKey {
            case bucketName
            case cannedAcl
            case key
            case roleArn
        }
    }

    public struct S3Destination: AWSEncodableShape & AWSDecodableShape {
        /// The S3 bucket that contains the updated firmware.
        public let bucket: String?
        /// The S3 prefix.
        public let prefix: String?

        public init(bucket: String? = nil, prefix: String? = nil) {
            self.bucket = bucket
            self.prefix = prefix
        }

        public func validate(name: String) throws {
            try self.validate(self.bucket, name: "bucket", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case bucket
            case prefix
        }
    }

    public struct S3Location: AWSEncodableShape & AWSDecodableShape {
        /// The S3 bucket.
        public let bucket: String?
        /// The S3 key.
        public let key: String?
        /// The S3 bucket version.
        public let version: String?

        public init(bucket: String? = nil, key: String? = nil, version: String? = nil) {
            self.bucket = bucket
            self.key = key
            self.version = version
        }

        public func validate(name: String) throws {
            try self.validate(self.bucket, name: "bucket", parent: name, min: 1)
            try self.validate(self.key, name: "key", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case bucket
            case key
            case version
        }
    }

    public struct SalesforceAction: AWSEncodableShape & AWSDecodableShape {
        /// The token used to authenticate access to the Salesforce IoT Cloud Input Stream. The token is available from the Salesforce IoT Cloud platform after creation of the Input Stream.
        public let token: String
        /// The URL exposed by the Salesforce IoT Cloud Input Stream. The URL is available from the Salesforce IoT Cloud platform after creation of the Input Stream.
        public let url: String

        public init(token: String, url: String) {
            self.token = token
            self.url = url
        }

        public func validate(name: String) throws {
            try self.validate(self.token, name: "token", parent: name, min: 40)
            try self.validate(self.url, name: "url", parent: name, max: 2000)
            try self.validate(self.url, name: "url", parent: name, pattern: "https://ingestion-[a-zA-Z0-9]{1,12}\\.[a-zA-Z0-9]+\\.((sfdc-matrix\\.net)|(sfdcnow\\.com))/streams/\\w{1,20}/\\w{1,20}/event")
        }

        private enum CodingKeys: String, CodingKey {
            case token
            case url
        }
    }

    public struct ScheduledAuditMetadata: AWSDecodableShape {
        /// The day of the month on which the scheduled audit is run (if the frequency is "MONTHLY"). If days 29-31 are specified, and the month does not have that many days, the audit takes place on the "LAST" day of the month.
        public let dayOfMonth: String?
        /// The day of the week on which the scheduled audit is run (if the frequency is "WEEKLY" or "BIWEEKLY").
        public let dayOfWeek: DayOfWeek?
        /// How often the scheduled audit occurs.
        public let frequency: AuditFrequency?
        /// The ARN of the scheduled audit.
        public let scheduledAuditArn: String?
        /// The name of the scheduled audit.
        public let scheduledAuditName: String?

        public init(dayOfMonth: String? = nil, dayOfWeek: DayOfWeek? = nil, frequency: AuditFrequency? = nil, scheduledAuditArn: String? = nil, scheduledAuditName: String? = nil) {
            self.dayOfMonth = dayOfMonth
            self.dayOfWeek = dayOfWeek
            self.frequency = frequency
            self.scheduledAuditArn = scheduledAuditArn
            self.scheduledAuditName = scheduledAuditName
        }

        private enum CodingKeys: String, CodingKey {
            case dayOfMonth
            case dayOfWeek
            case frequency
            case scheduledAuditArn
            case scheduledAuditName
        }
    }

    public struct SearchIndexRequest: AWSEncodableShape {
        /// The search index name.
        public let indexName: String?
        /// The maximum number of results to return at one time.
        public let maxResults: Int?
        /// The token used to get the next set of results, or null if there are no additional results.
        public let nextToken: String?
        /// The search query string.
        public let queryString: String
        /// The query version.
        public let queryVersion: String?

        public init(indexName: String? = nil, maxResults: Int? = nil, nextToken: String? = nil, queryString: String, queryVersion: String? = nil) {
            self.indexName = indexName
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.queryString = queryString
            self.queryVersion = queryVersion
        }

        public func validate(name: String) throws {
            try self.validate(self.indexName, name: "indexName", parent: name, max: 128)
            try self.validate(self.indexName, name: "indexName", parent: name, min: 1)
            try self.validate(self.indexName, name: "indexName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
            try self.validate(self.queryString, name: "queryString", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case indexName
            case maxResults
            case nextToken
            case queryString
            case queryVersion
        }
    }

    public struct SearchIndexResponse: AWSDecodableShape {
        /// The token used to get the next set of results, or null if there are no additional results.
        public let nextToken: String?
        /// The thing groups that match the search query.
        public let thingGroups: [ThingGroupDocument]?
        /// The things that match the search query.
        public let things: [ThingDocument]?

        public init(nextToken: String? = nil, thingGroups: [ThingGroupDocument]? = nil, things: [ThingDocument]? = nil) {
            self.nextToken = nextToken
            self.thingGroups = thingGroups
            self.things = things
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case thingGroups
            case things
        }
    }

    public struct SecurityProfileIdentifier: AWSDecodableShape {
        /// The ARN of the security profile.
        public let arn: String
        /// The name you've given to the security profile.
        public let name: String

        public init(arn: String, name: String) {
            self.arn = arn
            self.name = name
        }

        private enum CodingKeys: String, CodingKey {
            case arn
            case name
        }
    }

    public struct SecurityProfileTarget: AWSDecodableShape {
        /// The ARN of the security profile.
        public let arn: String

        public init(arn: String) {
            self.arn = arn
        }

        private enum CodingKeys: String, CodingKey {
            case arn
        }
    }

    public struct SecurityProfileTargetMapping: AWSDecodableShape {
        /// Information that identifies the security profile.
        public let securityProfileIdentifier: SecurityProfileIdentifier?
        /// Information about the target (thing group) associated with the security profile.
        public let target: SecurityProfileTarget?

        public init(securityProfileIdentifier: SecurityProfileIdentifier? = nil, target: SecurityProfileTarget? = nil) {
            self.securityProfileIdentifier = securityProfileIdentifier
            self.target = target
        }

        private enum CodingKeys: String, CodingKey {
            case securityProfileIdentifier
            case target
        }
    }

    public struct ServerCertificateSummary: AWSDecodableShape {
        /// The ARN of the server certificate.
        public let serverCertificateArn: String?
        /// The status of the server certificate.
        public let serverCertificateStatus: ServerCertificateStatus?
        /// Details that explain the status of the server certificate.
        public let serverCertificateStatusDetail: String?

        public init(serverCertificateArn: String? = nil, serverCertificateStatus: ServerCertificateStatus? = nil, serverCertificateStatusDetail: String? = nil) {
            self.serverCertificateArn = serverCertificateArn
            self.serverCertificateStatus = serverCertificateStatus
            self.serverCertificateStatusDetail = serverCertificateStatusDetail
        }

        private enum CodingKeys: String, CodingKey {
            case serverCertificateArn
            case serverCertificateStatus
            case serverCertificateStatusDetail
        }
    }

    public struct SetDefaultAuthorizerRequest: AWSEncodableShape {
        /// The authorizer name.
        public let authorizerName: String

        public init(authorizerName: String) {
            self.authorizerName = authorizerName
        }

        public func validate(name: String) throws {
            try self.validate(self.authorizerName, name: "authorizerName", parent: name, max: 128)
            try self.validate(self.authorizerName, name: "authorizerName", parent: name, min: 1)
            try self.validate(self.authorizerName, name: "authorizerName", parent: name, pattern: "[\\w=,@-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case authorizerName
        }
    }

    public struct SetDefaultAuthorizerResponse: AWSDecodableShape {
        /// The authorizer ARN.
        public let authorizerArn: String?
        /// The authorizer name.
        public let authorizerName: String?

        public init(authorizerArn: String? = nil, authorizerName: String? = nil) {
            self.authorizerArn = authorizerArn
            self.authorizerName = authorizerName
        }

        private enum CodingKeys: String, CodingKey {
            case authorizerArn
            case authorizerName
        }
    }

    public struct SetDefaultPolicyVersionRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "policyName", location: .uri(locationName: "policyName")),
            AWSMemberEncoding(label: "policyVersionId", location: .uri(locationName: "policyVersionId"))
        ]

        /// The policy name.
        public let policyName: String
        /// The policy version ID.
        public let policyVersionId: String

        public init(policyName: String, policyVersionId: String) {
            self.policyName = policyName
            self.policyVersionId = policyVersionId
        }

        public func validate(name: String) throws {
            try self.validate(self.policyName, name: "policyName", parent: name, max: 128)
            try self.validate(self.policyName, name: "policyName", parent: name, min: 1)
            try self.validate(self.policyName, name: "policyName", parent: name, pattern: "[\\w+=,.@-]+")
            try self.validate(self.policyVersionId, name: "policyVersionId", parent: name, pattern: "[0-9]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct SetLoggingOptionsRequest: AWSEncodableShape & AWSShapeWithPayload {
        /// The key for the payload
        public static let _payloadPath: String = "loggingOptionsPayload"

        /// The logging options payload.
        public let loggingOptionsPayload: LoggingOptionsPayload

        public init(loggingOptionsPayload: LoggingOptionsPayload) {
            self.loggingOptionsPayload = loggingOptionsPayload
        }

        private enum CodingKeys: String, CodingKey {
            case loggingOptionsPayload
        }
    }

    public struct SetV2LoggingLevelRequest: AWSEncodableShape {
        /// The log level.
        public let logLevel: LogLevel
        /// The log target.
        public let logTarget: LogTarget

        public init(logLevel: LogLevel, logTarget: LogTarget) {
            self.logLevel = logLevel
            self.logTarget = logTarget
        }

        private enum CodingKeys: String, CodingKey {
            case logLevel
            case logTarget
        }
    }

    public struct SetV2LoggingOptionsRequest: AWSEncodableShape {
        /// The default logging level.
        public let defaultLogLevel: LogLevel?
        /// If true all logs are disabled. The default is false.
        public let disableAllLogs: Bool?
        /// The ARN of the role that allows IoT to write to Cloudwatch logs.
        public let roleArn: String?

        public init(defaultLogLevel: LogLevel? = nil, disableAllLogs: Bool? = nil, roleArn: String? = nil) {
            self.defaultLogLevel = defaultLogLevel
            self.disableAllLogs = disableAllLogs
            self.roleArn = roleArn
        }

        private enum CodingKeys: String, CodingKey {
            case defaultLogLevel
            case disableAllLogs
            case roleArn
        }
    }

    public struct SigV4Authorization: AWSEncodableShape & AWSDecodableShape {
        /// The ARN of the signing role.
        public let roleArn: String
        /// The service name to use while signing with Sig V4.
        public let serviceName: String
        /// The signing region.
        public let signingRegion: String

        public init(roleArn: String, serviceName: String, signingRegion: String) {
            self.roleArn = roleArn
            self.serviceName = serviceName
            self.signingRegion = signingRegion
        }

        private enum CodingKeys: String, CodingKey {
            case roleArn
            case serviceName
            case signingRegion
        }
    }

    public struct SigningProfileParameter: AWSEncodableShape & AWSDecodableShape {
        /// Certificate ARN.
        public let certificateArn: String?
        /// The location of the code-signing certificate on your device.
        public let certificatePathOnDevice: String?
        /// The hardware platform of your device.
        public let platform: String?

        public init(certificateArn: String? = nil, certificatePathOnDevice: String? = nil, platform: String? = nil) {
            self.certificateArn = certificateArn
            self.certificatePathOnDevice = certificatePathOnDevice
            self.platform = platform
        }

        private enum CodingKeys: String, CodingKey {
            case certificateArn
            case certificatePathOnDevice
            case platform
        }
    }

    public struct SnsAction: AWSEncodableShape & AWSDecodableShape {
        /// (Optional) The message format of the message to publish. Accepted values are "JSON" and "RAW". The default value of the attribute is "RAW". SNS uses this setting to determine if the payload should be parsed and relevant platform-specific bits of the payload should be extracted. To read more about SNS message formats, see https://docs.aws.amazon.com/sns/latest/dg/json-formats.html refer to their official documentation.
        public let messageFormat: MessageFormat?
        /// The ARN of the IAM role that grants access.
        public let roleArn: String
        /// The ARN of the SNS topic.
        public let targetArn: String

        public init(messageFormat: MessageFormat? = nil, roleArn: String, targetArn: String) {
            self.messageFormat = messageFormat
            self.roleArn = roleArn
            self.targetArn = targetArn
        }

        private enum CodingKeys: String, CodingKey {
            case messageFormat
            case roleArn
            case targetArn
        }
    }

    public struct SqsAction: AWSEncodableShape & AWSDecodableShape {
        /// The URL of the Amazon SQS queue.
        public let queueUrl: String
        /// The ARN of the IAM role that grants access.
        public let roleArn: String
        /// Specifies whether to use Base64 encoding.
        public let useBase64: Bool?

        public init(queueUrl: String, roleArn: String, useBase64: Bool? = nil) {
            self.queueUrl = queueUrl
            self.roleArn = roleArn
            self.useBase64 = useBase64
        }

        private enum CodingKeys: String, CodingKey {
            case queueUrl
            case roleArn
            case useBase64
        }
    }

    public struct StartAuditMitigationActionsTaskRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "taskId", location: .uri(locationName: "taskId"))
        ]

        /// For an audit check, specifies which mitigation actions to apply. Those actions must be defined in your AWS account.
        public let auditCheckToActionsMapping: [String: [String]]
        /// Each audit mitigation task must have a unique client request token. If you try to start a new task with the same token as a task that already exists, an exception occurs. If you omit this value, a unique client request token is generated automatically.
        public let clientRequestToken: String
        /// Specifies the audit findings to which the mitigation actions are applied. You can apply them to a type of audit check, to all findings from an audit, or to a specific set of findings.
        public let target: AuditMitigationActionsTaskTarget
        /// A unique identifier for the task. You can use this identifier to check the status of the task or to cancel it.
        public let taskId: String

        public init(auditCheckToActionsMapping: [String: [String]], clientRequestToken: String = StartAuditMitigationActionsTaskRequest.idempotencyToken(), target: AuditMitigationActionsTaskTarget, taskId: String) {
            self.auditCheckToActionsMapping = auditCheckToActionsMapping
            self.clientRequestToken = clientRequestToken
            self.target = target
            self.taskId = taskId
        }

        public func validate(name: String) throws {
            try self.auditCheckToActionsMapping.forEach {
                try validate($0.value, name: "auditCheckToActionsMapping[\"\($0.key)\"]", parent: name, max: 5)
                try validate($0.value, name: "auditCheckToActionsMapping[\"\($0.key)\"]", parent: name, min: 1)
            }
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 64)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[a-zA-Z0-9-_]+$")
            try self.target.validate(name: "\(name).target")
            try self.validate(self.taskId, name: "taskId", parent: name, max: 128)
            try self.validate(self.taskId, name: "taskId", parent: name, min: 1)
            try self.validate(self.taskId, name: "taskId", parent: name, pattern: "[a-zA-Z0-9_-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case auditCheckToActionsMapping
            case clientRequestToken
            case target
        }
    }

    public struct StartAuditMitigationActionsTaskResponse: AWSDecodableShape {
        /// The unique identifier for the audit mitigation task. This matches the taskId that you specified in the request.
        public let taskId: String?

        public init(taskId: String? = nil) {
            self.taskId = taskId
        }

        private enum CodingKeys: String, CodingKey {
            case taskId
        }
    }

    public struct StartDetectMitigationActionsTaskRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "taskId", location: .uri(locationName: "taskId"))
        ]

        ///  The actions to be performed when a device has unexpected behavior.
        public let actions: [String]
        ///  Each mitigation action task must have a unique client request token. If you try to create a new task with the same token as a task that already exists, an exception occurs. If you omit this value, AWS SDKs will automatically generate a unique client request.
        public let clientRequestToken: String
        ///  Specifies to list only active violations.
        public let includeOnlyActiveViolations: Bool?
        ///  Specifies to include suppressed alerts.
        public let includeSuppressedAlerts: Bool?
        ///  Specifies the ML Detect findings to which the mitigation actions are applied.
        public let target: DetectMitigationActionsTaskTarget
        ///  The unique identifier of the task.
        public let taskId: String
        ///  Specifies the time period of which violation events occurred between.
        public let violationEventOccurrenceRange: ViolationEventOccurrenceRange?

        public init(actions: [String], clientRequestToken: String = StartDetectMitigationActionsTaskRequest.idempotencyToken(), includeOnlyActiveViolations: Bool? = nil, includeSuppressedAlerts: Bool? = nil, target: DetectMitigationActionsTaskTarget, taskId: String, violationEventOccurrenceRange: ViolationEventOccurrenceRange? = nil) {
            self.actions = actions
            self.clientRequestToken = clientRequestToken
            self.includeOnlyActiveViolations = includeOnlyActiveViolations
            self.includeSuppressedAlerts = includeSuppressedAlerts
            self.target = target
            self.taskId = taskId
            self.violationEventOccurrenceRange = violationEventOccurrenceRange
        }

        public func validate(name: String) throws {
            try self.actions.forEach {
                try validate($0, name: "actions[]", parent: name, max: 128)
                try validate($0, name: "actions[]", parent: name, pattern: "[a-zA-Z0-9_-]+")
            }
            try self.validate(self.actions, name: "actions", parent: name, max: 5)
            try self.validate(self.actions, name: "actions", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, max: 64)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, min: 1)
            try self.validate(self.clientRequestToken, name: "clientRequestToken", parent: name, pattern: "^[a-zA-Z0-9-_]+$")
            try self.target.validate(name: "\(name).target")
            try self.validate(self.taskId, name: "taskId", parent: name, max: 128)
            try self.validate(self.taskId, name: "taskId", parent: name, min: 1)
            try self.validate(self.taskId, name: "taskId", parent: name, pattern: "[a-zA-Z0-9_-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case actions
            case clientRequestToken
            case includeOnlyActiveViolations
            case includeSuppressedAlerts
            case target
            case violationEventOccurrenceRange
        }
    }

    public struct StartDetectMitigationActionsTaskResponse: AWSDecodableShape {
        ///  The unique identifier of the task.
        public let taskId: String?

        public init(taskId: String? = nil) {
            self.taskId = taskId
        }

        private enum CodingKeys: String, CodingKey {
            case taskId
        }
    }

    public struct StartOnDemandAuditTaskRequest: AWSEncodableShape {
        /// Which checks are performed during the audit. The checks you specify must be enabled for your account or an exception occurs. Use DescribeAccountAuditConfiguration to see the list of all checks, including those that are enabled or UpdateAccountAuditConfiguration to select which checks are enabled.
        public let targetCheckNames: [String]

        public init(targetCheckNames: [String]) {
            self.targetCheckNames = targetCheckNames
        }

        private enum CodingKeys: String, CodingKey {
            case targetCheckNames
        }
    }

    public struct StartOnDemandAuditTaskResponse: AWSDecodableShape {
        /// The ID of the on-demand audit you started.
        public let taskId: String?

        public init(taskId: String? = nil) {
            self.taskId = taskId
        }

        private enum CodingKeys: String, CodingKey {
            case taskId
        }
    }

    public struct StartSigningJobParameter: AWSEncodableShape & AWSDecodableShape {
        /// The location to write the code-signed file.
        public let destination: Destination?
        /// The code-signing profile name.
        public let signingProfileName: String?
        /// Describes the code-signing profile.
        public let signingProfileParameter: SigningProfileParameter?

        public init(destination: Destination? = nil, signingProfileName: String? = nil, signingProfileParameter: SigningProfileParameter? = nil) {
            self.destination = destination
            self.signingProfileName = signingProfileName
            self.signingProfileParameter = signingProfileParameter
        }

        public func validate(name: String) throws {
            try self.destination?.validate(name: "\(name).destination")
        }

        private enum CodingKeys: String, CodingKey {
            case destination
            case signingProfileName
            case signingProfileParameter
        }
    }

    public struct StartThingRegistrationTaskRequest: AWSEncodableShape {
        /// The S3 bucket that contains the input file.
        public let inputFileBucket: String
        /// The name of input file within the S3 bucket. This file contains a newline delimited JSON file. Each line contains the parameter values to provision one device (thing).
        public let inputFileKey: String
        /// The IAM role ARN that grants permission the input file.
        public let roleArn: String
        /// The provisioning template.
        public let templateBody: String

        public init(inputFileBucket: String, inputFileKey: String, roleArn: String, templateBody: String) {
            self.inputFileBucket = inputFileBucket
            self.inputFileKey = inputFileKey
            self.roleArn = roleArn
            self.templateBody = templateBody
        }

        public func validate(name: String) throws {
            try self.validate(self.inputFileBucket, name: "inputFileBucket", parent: name, max: 256)
            try self.validate(self.inputFileBucket, name: "inputFileBucket", parent: name, min: 3)
            try self.validate(self.inputFileBucket, name: "inputFileBucket", parent: name, pattern: "[a-zA-Z0-9._-]+")
            try self.validate(self.inputFileKey, name: "inputFileKey", parent: name, max: 1024)
            try self.validate(self.inputFileKey, name: "inputFileKey", parent: name, min: 1)
            try self.validate(self.inputFileKey, name: "inputFileKey", parent: name, pattern: "[a-zA-Z0-9!_.*'()-\\/]+")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 20)
        }

        private enum CodingKeys: String, CodingKey {
            case inputFileBucket
            case inputFileKey
            case roleArn
            case templateBody
        }
    }

    public struct StartThingRegistrationTaskResponse: AWSDecodableShape {
        /// The bulk thing provisioning task ID.
        public let taskId: String?

        public init(taskId: String? = nil) {
            self.taskId = taskId
        }

        private enum CodingKeys: String, CodingKey {
            case taskId
        }
    }

    public struct StatisticalThreshold: AWSEncodableShape & AWSDecodableShape {
        /// The percentile that resolves to a threshold value by which compliance with a behavior is determined. Metrics are collected over the specified period (durationSeconds) from all reporting devices in your account and statistical ranks are calculated. Then, the measurements from a device are collected over the same period. If the accumulated measurements from the device fall above or below (comparisonOperator) the value associated with the percentile specified, then the device is considered to be in compliance with the behavior, otherwise a violation occurs.
        public let statistic: String?

        public init(statistic: String? = nil) {
            self.statistic = statistic
        }

        public func validate(name: String) throws {
            try self.validate(self.statistic, name: "statistic", parent: name, pattern: "(p0|p0\\.1|p0\\.01|p1|p10|p50|p90|p99|p99\\.9|p99\\.99|p100)")
        }

        private enum CodingKeys: String, CodingKey {
            case statistic
        }
    }

    public struct Statistics: AWSDecodableShape {
        /// The average of the aggregated field values.
        public let average: Double?
        /// The count of things that match the query.
        public let count: Int?
        /// The maximum aggregated field value.
        public let maximum: Double?
        /// The minimum aggregated field value.
        public let minimum: Double?
        /// The standard deviation of the aggregated field values.
        public let stdDeviation: Double?
        /// The sum of the aggregated field values.
        public let sum: Double?
        /// The sum of the squares of the aggregated field values.
        public let sumOfSquares: Double?
        /// The variance of the aggregated field values.
        public let variance: Double?

        public init(average: Double? = nil, count: Int? = nil, maximum: Double? = nil, minimum: Double? = nil, stdDeviation: Double? = nil, sum: Double? = nil, sumOfSquares: Double? = nil, variance: Double? = nil) {
            self.average = average
            self.count = count
            self.maximum = maximum
            self.minimum = minimum
            self.stdDeviation = stdDeviation
            self.sum = sum
            self.sumOfSquares = sumOfSquares
            self.variance = variance
        }

        private enum CodingKeys: String, CodingKey {
            case average
            case count
            case maximum
            case minimum
            case stdDeviation
            case sum
            case sumOfSquares
            case variance
        }
    }

    public struct StepFunctionsAction: AWSEncodableShape & AWSDecodableShape {
        /// (Optional) A name will be given to the state machine execution consisting of this prefix followed by a UUID. Step Functions automatically creates a unique name for each state machine execution if one is not provided.
        public let executionNamePrefix: String?
        /// The ARN of the role that grants IoT permission to start execution of a state machine ("Action":"states:StartExecution").
        public let roleArn: String
        /// The name of the Step Functions state machine whose execution will be started.
        public let stateMachineName: String

        public init(executionNamePrefix: String? = nil, roleArn: String, stateMachineName: String) {
            self.executionNamePrefix = executionNamePrefix
            self.roleArn = roleArn
            self.stateMachineName = stateMachineName
        }

        private enum CodingKeys: String, CodingKey {
            case executionNamePrefix
            case roleArn
            case stateMachineName
        }
    }

    public struct StopThingRegistrationTaskRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "taskId", location: .uri(locationName: "taskId"))
        ]

        /// The bulk thing provisioning task ID.
        public let taskId: String

        public init(taskId: String) {
            self.taskId = taskId
        }

        public func validate(name: String) throws {
            try self.validate(self.taskId, name: "taskId", parent: name, max: 40)
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct StopThingRegistrationTaskResponse: AWSDecodableShape {
        public init() {}
    }

    public struct Stream: AWSEncodableShape & AWSDecodableShape {
        /// The ID of a file associated with a stream.
        public let fileId: Int?
        /// The stream ID.
        public let streamId: String?

        public init(fileId: Int? = nil, streamId: String? = nil) {
            self.fileId = fileId
            self.streamId = streamId
        }

        public func validate(name: String) throws {
            try self.validate(self.fileId, name: "fileId", parent: name, max: 255)
            try self.validate(self.fileId, name: "fileId", parent: name, min: 0)
            try self.validate(self.streamId, name: "streamId", parent: name, max: 128)
            try self.validate(self.streamId, name: "streamId", parent: name, min: 1)
            try self.validate(self.streamId, name: "streamId", parent: name, pattern: "[a-zA-Z0-9_-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case fileId
            case streamId
        }
    }

    public struct StreamFile: AWSEncodableShape & AWSDecodableShape {
        /// The file ID.
        public let fileId: Int?
        /// The location of the file in S3.
        public let s3Location: S3Location?

        public init(fileId: Int? = nil, s3Location: S3Location? = nil) {
            self.fileId = fileId
            self.s3Location = s3Location
        }

        public func validate(name: String) throws {
            try self.validate(self.fileId, name: "fileId", parent: name, max: 255)
            try self.validate(self.fileId, name: "fileId", parent: name, min: 0)
            try self.s3Location?.validate(name: "\(name).s3Location")
        }

        private enum CodingKeys: String, CodingKey {
            case fileId
            case s3Location
        }
    }

    public struct StreamInfo: AWSDecodableShape {
        /// The date when the stream was created.
        public let createdAt: Date?
        /// The description of the stream.
        public let description: String?
        /// The files to stream.
        public let files: [StreamFile]?
        /// The date when the stream was last updated.
        public let lastUpdatedAt: Date?
        /// An IAM role AWS IoT assumes to access your S3 files.
        public let roleArn: String?
        /// The stream ARN.
        public let streamArn: String?
        /// The stream ID.
        public let streamId: String?
        /// The stream version.
        public let streamVersion: Int?

        public init(createdAt: Date? = nil, description: String? = nil, files: [StreamFile]? = nil, lastUpdatedAt: Date? = nil, roleArn: String? = nil, streamArn: String? = nil, streamId: String? = nil, streamVersion: Int? = nil) {
            self.createdAt = createdAt
            self.description = description
            self.files = files
            self.lastUpdatedAt = lastUpdatedAt
            self.roleArn = roleArn
            self.streamArn = streamArn
            self.streamId = streamId
            self.streamVersion = streamVersion
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt
            case description
            case files
            case lastUpdatedAt
            case roleArn
            case streamArn
            case streamId
            case streamVersion
        }
    }

    public struct StreamSummary: AWSDecodableShape {
        /// A description of the stream.
        public let description: String?
        /// The stream ARN.
        public let streamArn: String?
        /// The stream ID.
        public let streamId: String?
        /// The stream version.
        public let streamVersion: Int?

        public init(description: String? = nil, streamArn: String? = nil, streamId: String? = nil, streamVersion: Int? = nil) {
            self.description = description
            self.streamArn = streamArn
            self.streamId = streamId
            self.streamVersion = streamVersion
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case streamArn
            case streamId
            case streamVersion
        }
    }

    public struct Tag: AWSEncodableShape & AWSDecodableShape {
        /// The tag's key.
        public let key: String
        /// The tag's value.
        public let value: String?

        public init(key: String, value: String? = nil) {
            self.key = key
            self.value = value
        }

        public func validate(name: String) throws {
            try self.validate(self.key, name: "key", parent: name, max: 128)
            try self.validate(self.key, name: "key", parent: name, min: 1)
            try self.validate(self.key, name: "key", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            try self.validate(self.value, name: "value", parent: name, max: 256)
            try self.validate(self.value, name: "value", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case key = "Key"
            case value = "Value"
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        /// The ARN of the resource.
        public let resourceArn: String
        /// The new or modified tags for the resource.
        public let tags: [Tag]

        public init(resourceArn: String, tags: [Tag]) {
            self.resourceArn = resourceArn
            self.tags = tags
        }

        public func validate(name: String) throws {
            try self.tags.forEach {
                try $0.validate(name: "\(name).tags[]")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn
            case tags
        }
    }

    public struct TagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct TaskStatistics: AWSDecodableShape {
        /// The number of checks that did not run because the audit was canceled.
        public let canceledChecks: Int?
        /// The number of checks that found compliant resources.
        public let compliantChecks: Int?
        /// The number of checks.
        public let failedChecks: Int?
        /// The number of checks in progress.
        public let inProgressChecks: Int?
        /// The number of checks that found noncompliant resources.
        public let nonCompliantChecks: Int?
        /// The number of checks in this audit.
        public let totalChecks: Int?
        /// The number of checks waiting for data collection.
        public let waitingForDataCollectionChecks: Int?

        public init(canceledChecks: Int? = nil, compliantChecks: Int? = nil, failedChecks: Int? = nil, inProgressChecks: Int? = nil, nonCompliantChecks: Int? = nil, totalChecks: Int? = nil, waitingForDataCollectionChecks: Int? = nil) {
            self.canceledChecks = canceledChecks
            self.compliantChecks = compliantChecks
            self.failedChecks = failedChecks
            self.inProgressChecks = inProgressChecks
            self.nonCompliantChecks = nonCompliantChecks
            self.totalChecks = totalChecks
            self.waitingForDataCollectionChecks = waitingForDataCollectionChecks
        }

        private enum CodingKeys: String, CodingKey {
            case canceledChecks
            case compliantChecks
            case failedChecks
            case inProgressChecks
            case nonCompliantChecks
            case totalChecks
            case waitingForDataCollectionChecks
        }
    }

    public struct TaskStatisticsForAuditCheck: AWSDecodableShape {
        /// The number of findings to which the mitigation action task was canceled when applied.
        public let canceledFindingsCount: Int64?
        /// The number of findings for which at least one of the actions failed when applied.
        public let failedFindingsCount: Int64?
        /// The number of findings skipped because of filter conditions provided in the parameters to the command.
        public let skippedFindingsCount: Int64?
        /// The number of findings for which all mitigation actions succeeded when applied.
        public let succeededFindingsCount: Int64?
        /// The total number of findings to which a task is being applied.
        public let totalFindingsCount: Int64?

        public init(canceledFindingsCount: Int64? = nil, failedFindingsCount: Int64? = nil, skippedFindingsCount: Int64? = nil, succeededFindingsCount: Int64? = nil, totalFindingsCount: Int64? = nil) {
            self.canceledFindingsCount = canceledFindingsCount
            self.failedFindingsCount = failedFindingsCount
            self.skippedFindingsCount = skippedFindingsCount
            self.succeededFindingsCount = succeededFindingsCount
            self.totalFindingsCount = totalFindingsCount
        }

        private enum CodingKeys: String, CodingKey {
            case canceledFindingsCount
            case failedFindingsCount
            case skippedFindingsCount
            case succeededFindingsCount
            case totalFindingsCount
        }
    }

    public struct TestAuthorizationRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "clientId", location: .querystring(locationName: "clientId"))
        ]

        /// A list of authorization info objects. Simulating authorization will create a response for each authInfo object in the list.
        public let authInfos: [AuthInfo]
        /// The MQTT client ID.
        public let clientId: String?
        /// The Cognito identity pool ID.
        public let cognitoIdentityPoolId: String?
        /// When testing custom authorization, the policies specified here are treated as if they are attached to the principal being authorized.
        public let policyNamesToAdd: [String]?
        /// When testing custom authorization, the policies specified here are treated as if they are not attached to the principal being authorized.
        public let policyNamesToSkip: [String]?
        /// The principal. Valid principals are CertificateArn (arn:aws:iot:region:accountId:cert/certificateId), thingGroupArn (arn:aws:iot:region:accountId:thinggroup/groupName) and CognitoId (region:id).
        public let principal: String?

        public init(authInfos: [AuthInfo], clientId: String? = nil, cognitoIdentityPoolId: String? = nil, policyNamesToAdd: [String]? = nil, policyNamesToSkip: [String]? = nil, principal: String? = nil) {
            self.authInfos = authInfos
            self.clientId = clientId
            self.cognitoIdentityPoolId = cognitoIdentityPoolId
            self.policyNamesToAdd = policyNamesToAdd
            self.policyNamesToSkip = policyNamesToSkip
            self.principal = principal
        }

        public func validate(name: String) throws {
            try self.authInfos.forEach {
                try $0.validate(name: "\(name).authInfos[]")
            }
            try self.validate(self.authInfos, name: "authInfos", parent: name, max: 10)
            try self.validate(self.authInfos, name: "authInfos", parent: name, min: 1)
            try self.policyNamesToAdd?.forEach {
                try validate($0, name: "policyNamesToAdd[]", parent: name, max: 128)
                try validate($0, name: "policyNamesToAdd[]", parent: name, min: 1)
                try validate($0, name: "policyNamesToAdd[]", parent: name, pattern: "[\\w+=,.@-]+")
            }
            try self.policyNamesToSkip?.forEach {
                try validate($0, name: "policyNamesToSkip[]", parent: name, max: 128)
                try validate($0, name: "policyNamesToSkip[]", parent: name, min: 1)
                try validate($0, name: "policyNamesToSkip[]", parent: name, pattern: "[\\w+=,.@-]+")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case authInfos
            case cognitoIdentityPoolId
            case policyNamesToAdd
            case policyNamesToSkip
            case principal
        }
    }

    public struct TestAuthorizationResponse: AWSDecodableShape {
        /// The authentication results.
        public let authResults: [AuthResult]?

        public init(authResults: [AuthResult]? = nil) {
            self.authResults = authResults
        }

        private enum CodingKeys: String, CodingKey {
            case authResults
        }
    }

    public struct TestInvokeAuthorizerRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "authorizerName", location: .uri(locationName: "authorizerName"))
        ]

        /// The custom authorizer name.
        public let authorizerName: String
        /// Specifies a test HTTP authorization request.
        public let httpContext: HttpContext?
        /// Specifies a test MQTT authorization request.
        public let mqttContext: MqttContext?
        /// Specifies a test TLS authorization request.
        public let tlsContext: TlsContext?
        /// The token returned by your custom authentication service.
        public let token: String?
        /// The signature made with the token and your custom authentication service's private key. This value must be Base-64-encoded.
        public let tokenSignature: String?

        public init(authorizerName: String, httpContext: HttpContext? = nil, mqttContext: MqttContext? = nil, tlsContext: TlsContext? = nil, token: String? = nil, tokenSignature: String? = nil) {
            self.authorizerName = authorizerName
            self.httpContext = httpContext
            self.mqttContext = mqttContext
            self.tlsContext = tlsContext
            self.token = token
            self.tokenSignature = tokenSignature
        }

        public func validate(name: String) throws {
            try self.validate(self.authorizerName, name: "authorizerName", parent: name, max: 128)
            try self.validate(self.authorizerName, name: "authorizerName", parent: name, min: 1)
            try self.validate(self.authorizerName, name: "authorizerName", parent: name, pattern: "[\\w=,@-]+")
            try self.httpContext?.validate(name: "\(name).httpContext")
            try self.mqttContext?.validate(name: "\(name).mqttContext")
            try self.tlsContext?.validate(name: "\(name).tlsContext")
            try self.validate(self.token, name: "token", parent: name, max: 6144)
            try self.validate(self.token, name: "token", parent: name, min: 1)
            try self.validate(self.tokenSignature, name: "tokenSignature", parent: name, max: 2560)
            try self.validate(self.tokenSignature, name: "tokenSignature", parent: name, min: 1)
            try self.validate(self.tokenSignature, name: "tokenSignature", parent: name, pattern: "[A-Za-z0-9+/]+={0,2}")
        }

        private enum CodingKeys: String, CodingKey {
            case httpContext
            case mqttContext
            case tlsContext
            case token
            case tokenSignature
        }
    }

    public struct TestInvokeAuthorizerResponse: AWSDecodableShape {
        /// The number of seconds after which the connection is terminated.
        public let disconnectAfterInSeconds: Int?
        /// True if the token is authenticated, otherwise false.
        public let isAuthenticated: Bool?
        /// IAM policy documents.
        public let policyDocuments: [String]?
        /// The principal ID.
        public let principalId: String?
        /// The number of seconds after which the temporary credentials are refreshed.
        public let refreshAfterInSeconds: Int?

        public init(disconnectAfterInSeconds: Int? = nil, isAuthenticated: Bool? = nil, policyDocuments: [String]? = nil, principalId: String? = nil, refreshAfterInSeconds: Int? = nil) {
            self.disconnectAfterInSeconds = disconnectAfterInSeconds
            self.isAuthenticated = isAuthenticated
            self.policyDocuments = policyDocuments
            self.principalId = principalId
            self.refreshAfterInSeconds = refreshAfterInSeconds
        }

        private enum CodingKeys: String, CodingKey {
            case disconnectAfterInSeconds
            case isAuthenticated
            case policyDocuments
            case principalId
            case refreshAfterInSeconds
        }
    }

    public struct ThingAttribute: AWSDecodableShape {
        /// A list of thing attributes which are name-value pairs.
        public let attributes: [String: String]?
        /// The thing ARN.
        public let thingArn: String?
        /// The name of the thing.
        public let thingName: String?
        /// The name of the thing type, if the thing has been associated with a type.
        public let thingTypeName: String?
        /// The version of the thing record in the registry.
        public let version: Int64?

        public init(attributes: [String: String]? = nil, thingArn: String? = nil, thingName: String? = nil, thingTypeName: String? = nil, version: Int64? = nil) {
            self.attributes = attributes
            self.thingArn = thingArn
            self.thingName = thingName
            self.thingTypeName = thingTypeName
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case attributes
            case thingArn
            case thingName
            case thingTypeName
            case version
        }
    }

    public struct ThingConnectivity: AWSDecodableShape {
        /// True if the thing is connected to the AWS IoT service; false if it is not connected.
        public let connected: Bool?
        /// The epoch time (in milliseconds) when the thing last connected or disconnected. If the thing has been disconnected for more than a few weeks, the time value might be missing.
        public let timestamp: Int64?

        public init(connected: Bool? = nil, timestamp: Int64? = nil) {
            self.connected = connected
            self.timestamp = timestamp
        }

        private enum CodingKeys: String, CodingKey {
            case connected
            case timestamp
        }
    }

    public struct ThingDocument: AWSDecodableShape {
        /// The attributes.
        public let attributes: [String: String]?
        /// Indicates whether the thing is connected to the AWS IoT service.
        public let connectivity: ThingConnectivity?
        /// The shadow.
        public let shadow: String?
        /// Thing group names.
        public let thingGroupNames: [String]?
        /// The thing ID.
        public let thingId: String?
        /// The thing name.
        public let thingName: String?
        /// The thing type name.
        public let thingTypeName: String?

        public init(attributes: [String: String]? = nil, connectivity: ThingConnectivity? = nil, shadow: String? = nil, thingGroupNames: [String]? = nil, thingId: String? = nil, thingName: String? = nil, thingTypeName: String? = nil) {
            self.attributes = attributes
            self.connectivity = connectivity
            self.shadow = shadow
            self.thingGroupNames = thingGroupNames
            self.thingId = thingId
            self.thingName = thingName
            self.thingTypeName = thingTypeName
        }

        private enum CodingKeys: String, CodingKey {
            case attributes
            case connectivity
            case shadow
            case thingGroupNames
            case thingId
            case thingName
            case thingTypeName
        }
    }

    public struct ThingGroupDocument: AWSDecodableShape {
        /// The thing group attributes.
        public let attributes: [String: String]?
        /// Parent group names.
        public let parentGroupNames: [String]?
        /// The thing group description.
        public let thingGroupDescription: String?
        /// The thing group ID.
        public let thingGroupId: String?
        /// The thing group name.
        public let thingGroupName: String?

        public init(attributes: [String: String]? = nil, parentGroupNames: [String]? = nil, thingGroupDescription: String? = nil, thingGroupId: String? = nil, thingGroupName: String? = nil) {
            self.attributes = attributes
            self.parentGroupNames = parentGroupNames
            self.thingGroupDescription = thingGroupDescription
            self.thingGroupId = thingGroupId
            self.thingGroupName = thingGroupName
        }

        private enum CodingKeys: String, CodingKey {
            case attributes
            case parentGroupNames
            case thingGroupDescription
            case thingGroupId
            case thingGroupName
        }
    }

    public struct ThingGroupIndexingConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// A list of thing group fields to index. This list cannot contain any managed fields. Use the GetIndexingConfiguration API to get a list of managed fields. Contains custom field names and their data type.
        public let customFields: [Field]?
        /// Contains fields that are indexed and whose types are already known by the Fleet Indexing service.
        public let managedFields: [Field]?
        /// Thing group indexing mode.
        public let thingGroupIndexingMode: ThingGroupIndexingMode

        public init(customFields: [Field]? = nil, managedFields: [Field]? = nil, thingGroupIndexingMode: ThingGroupIndexingMode) {
            self.customFields = customFields
            self.managedFields = managedFields
            self.thingGroupIndexingMode = thingGroupIndexingMode
        }

        private enum CodingKeys: String, CodingKey {
            case customFields
            case managedFields
            case thingGroupIndexingMode
        }
    }

    public struct ThingGroupMetadata: AWSDecodableShape {
        /// The UNIX timestamp of when the thing group was created.
        public let creationDate: Date?
        /// The parent thing group name.
        public let parentGroupName: String?
        /// The root parent thing group.
        public let rootToParentThingGroups: [GroupNameAndArn]?

        public init(creationDate: Date? = nil, parentGroupName: String? = nil, rootToParentThingGroups: [GroupNameAndArn]? = nil) {
            self.creationDate = creationDate
            self.parentGroupName = parentGroupName
            self.rootToParentThingGroups = rootToParentThingGroups
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate
            case parentGroupName
            case rootToParentThingGroups
        }
    }

    public struct ThingGroupProperties: AWSEncodableShape & AWSDecodableShape {
        /// The thing group attributes in JSON format.
        public let attributePayload: AttributePayload?
        /// The thing group description.
        public let thingGroupDescription: String?

        public init(attributePayload: AttributePayload? = nil, thingGroupDescription: String? = nil) {
            self.attributePayload = attributePayload
            self.thingGroupDescription = thingGroupDescription
        }

        public func validate(name: String) throws {
            try self.attributePayload?.validate(name: "\(name).attributePayload")
            try self.validate(self.thingGroupDescription, name: "thingGroupDescription", parent: name, max: 2028)
            try self.validate(self.thingGroupDescription, name: "thingGroupDescription", parent: name, pattern: "[\\p{Graph}\\x20]*")
        }

        private enum CodingKeys: String, CodingKey {
            case attributePayload
            case thingGroupDescription
        }
    }

    public struct ThingIndexingConfiguration: AWSEncodableShape & AWSDecodableShape {
        /// Contains custom field names and their data type.
        public let customFields: [Field]?
        /// Contains fields that are indexed and whose types are already known by the Fleet Indexing service.
        public let managedFields: [Field]?
        /// Thing connectivity indexing mode. Valid values are:    STATUS – Your thing index contains connectivity status. To enable thing connectivity indexing, thingIndexMode must not be set to OFF.   OFF - Thing connectivity status indexing is disabled.
        public let thingConnectivityIndexingMode: ThingConnectivityIndexingMode?
        /// Thing indexing mode. Valid values are:   REGISTRY – Your thing index contains registry data only.   REGISTRY_AND_SHADOW - Your thing index contains registry and shadow data.   OFF - Thing indexing is disabled.
        public let thingIndexingMode: ThingIndexingMode

        public init(customFields: [Field]? = nil, managedFields: [Field]? = nil, thingConnectivityIndexingMode: ThingConnectivityIndexingMode? = nil, thingIndexingMode: ThingIndexingMode) {
            self.customFields = customFields
            self.managedFields = managedFields
            self.thingConnectivityIndexingMode = thingConnectivityIndexingMode
            self.thingIndexingMode = thingIndexingMode
        }

        private enum CodingKeys: String, CodingKey {
            case customFields
            case managedFields
            case thingConnectivityIndexingMode
            case thingIndexingMode
        }
    }

    public struct ThingTypeDefinition: AWSDecodableShape {
        /// The thing type ARN.
        public let thingTypeArn: String?
        /// The ThingTypeMetadata contains additional information about the thing type including: creation date and time, a value indicating whether the thing type is deprecated, and a date and time when it was deprecated.
        public let thingTypeMetadata: ThingTypeMetadata?
        /// The name of the thing type.
        public let thingTypeName: String?
        /// The ThingTypeProperties for the thing type.
        public let thingTypeProperties: ThingTypeProperties?

        public init(thingTypeArn: String? = nil, thingTypeMetadata: ThingTypeMetadata? = nil, thingTypeName: String? = nil, thingTypeProperties: ThingTypeProperties? = nil) {
            self.thingTypeArn = thingTypeArn
            self.thingTypeMetadata = thingTypeMetadata
            self.thingTypeName = thingTypeName
            self.thingTypeProperties = thingTypeProperties
        }

        private enum CodingKeys: String, CodingKey {
            case thingTypeArn
            case thingTypeMetadata
            case thingTypeName
            case thingTypeProperties
        }
    }

    public struct ThingTypeMetadata: AWSDecodableShape {
        /// The date and time when the thing type was created.
        public let creationDate: Date?
        /// Whether the thing type is deprecated. If true, no new things could be associated with this type.
        public let deprecated: Bool?
        /// The date and time when the thing type was deprecated.
        public let deprecationDate: Date?

        public init(creationDate: Date? = nil, deprecated: Bool? = nil, deprecationDate: Date? = nil) {
            self.creationDate = creationDate
            self.deprecated = deprecated
            self.deprecationDate = deprecationDate
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate
            case deprecated
            case deprecationDate
        }
    }

    public struct ThingTypeProperties: AWSEncodableShape & AWSDecodableShape {
        /// A list of searchable thing attribute names.
        public let searchableAttributes: [String]?
        /// The description of the thing type.
        public let thingTypeDescription: String?

        public init(searchableAttributes: [String]? = nil, thingTypeDescription: String? = nil) {
            self.searchableAttributes = searchableAttributes
            self.thingTypeDescription = thingTypeDescription
        }

        public func validate(name: String) throws {
            try self.searchableAttributes?.forEach {
                try validate($0, name: "searchableAttributes[]", parent: name, max: 128)
                try validate($0, name: "searchableAttributes[]", parent: name, pattern: "[a-zA-Z0-9_.,@/:#-]+")
            }
            try self.validate(self.thingTypeDescription, name: "thingTypeDescription", parent: name, max: 2028)
            try self.validate(self.thingTypeDescription, name: "thingTypeDescription", parent: name, pattern: "[\\p{Graph}\\x20]*")
        }

        private enum CodingKeys: String, CodingKey {
            case searchableAttributes
            case thingTypeDescription
        }
    }

    public struct TimeoutConfig: AWSEncodableShape & AWSDecodableShape {
        /// Specifies the amount of time, in minutes, this device has to finish execution of this job. The timeout interval can be anywhere between 1 minute and 7 days (1 to 10080 minutes). The in progress timer can't be updated and will apply to all job executions for the job. Whenever a job execution remains in the IN_PROGRESS status for longer than this interval, the job execution will fail and switch to the terminal TIMED_OUT status.
        public let inProgressTimeoutInMinutes: Int64?

        public init(inProgressTimeoutInMinutes: Int64? = nil) {
            self.inProgressTimeoutInMinutes = inProgressTimeoutInMinutes
        }

        private enum CodingKeys: String, CodingKey {
            case inProgressTimeoutInMinutes
        }
    }

    public struct TimestreamAction: AWSEncodableShape & AWSDecodableShape {
        /// The name of an Amazon Timestream database.
        public let databaseName: String
        /// Metadata attributes of the time series that are written in each measure record.
        public let dimensions: [TimestreamDimension]
        /// The ARN of the role that grants permission to write to the Amazon Timestream database table.
        public let roleArn: String
        /// The name of the database table into which to write the measure records.
        public let tableName: String
        /// Specifies an application-defined value to replace the default value assigned to the Timestream record's timestamp in the time column. You can use this property to specify the value and the precision of the Timestream record's timestamp. You can specify a value from the message payload or a value computed by a substitution template. If omitted, the topic rule action assigns the timestamp, in milliseconds, at the time it processed the rule.
        public let timestamp: TimestreamTimestamp?

        public init(databaseName: String, dimensions: [TimestreamDimension], roleArn: String, tableName: String, timestamp: TimestreamTimestamp? = nil) {
            self.databaseName = databaseName
            self.dimensions = dimensions
            self.roleArn = roleArn
            self.tableName = tableName
            self.timestamp = timestamp
        }

        public func validate(name: String) throws {
            try self.validate(self.dimensions, name: "dimensions", parent: name, max: 128)
            try self.validate(self.dimensions, name: "dimensions", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case databaseName
            case dimensions
            case roleArn
            case tableName
            case timestamp
        }
    }

    public struct TimestreamDimension: AWSEncodableShape & AWSDecodableShape {
        /// The metadata dimension name. This is the name of the column in the Amazon Timestream database table record. Dimensions cannot be named: measure_name, measure_value, or time. These names are reserved. Dimension names cannot start with ts_ or measure_value and they cannot contain the colon (:) character.
        public let name: String
        /// The value to write in this column of the database record.
        public let value: String

        public init(name: String, value: String) {
            self.name = name
            self.value = value
        }

        private enum CodingKeys: String, CodingKey {
            case name
            case value
        }
    }

    public struct TimestreamTimestamp: AWSEncodableShape & AWSDecodableShape {
        /// The precision of the timestamp value that results from the expression described in value. Valid values: SECONDS | MILLISECONDS | MICROSECONDS | NANOSECONDS. The default is MILLISECONDS.
        public let unit: String
        /// An expression that returns a long epoch time value.
        public let value: String

        public init(unit: String, value: String) {
            self.unit = unit
            self.value = value
        }

        private enum CodingKeys: String, CodingKey {
            case unit
            case value
        }
    }

    public struct TlsContext: AWSEncodableShape {
        /// The value of the serverName key in a TLS authorization request.
        public let serverName: String?

        public init(serverName: String? = nil) {
            self.serverName = serverName
        }

        public func validate(name: String) throws {
            try self.validate(self.serverName, name: "serverName", parent: name, max: 253)
            try self.validate(self.serverName, name: "serverName", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case serverName
        }
    }

    public struct TopicRule: AWSDecodableShape {
        /// The actions associated with the rule.
        public let actions: [Action]?
        /// The version of the SQL rules engine to use when evaluating the rule.
        public let awsIotSqlVersion: String?
        /// The date and time the rule was created.
        public let createdAt: Date?
        /// The description of the rule.
        public let description: String?
        /// The action to perform when an error occurs.
        public let errorAction: Action?
        /// Specifies whether the rule is disabled.
        public let ruleDisabled: Bool?
        /// The name of the rule.
        public let ruleName: String?
        /// The SQL statement used to query the topic. When using a SQL query with multiple lines, be sure to escape the newline characters.
        public let sql: String?

        public init(actions: [Action]? = nil, awsIotSqlVersion: String? = nil, createdAt: Date? = nil, description: String? = nil, errorAction: Action? = nil, ruleDisabled: Bool? = nil, ruleName: String? = nil, sql: String? = nil) {
            self.actions = actions
            self.awsIotSqlVersion = awsIotSqlVersion
            self.createdAt = createdAt
            self.description = description
            self.errorAction = errorAction
            self.ruleDisabled = ruleDisabled
            self.ruleName = ruleName
            self.sql = sql
        }

        private enum CodingKeys: String, CodingKey {
            case actions
            case awsIotSqlVersion
            case createdAt
            case description
            case errorAction
            case ruleDisabled
            case ruleName
            case sql
        }
    }

    public struct TopicRuleDestination: AWSDecodableShape {
        /// The topic rule destination URL.
        public let arn: String?
        /// The date and time when the topic rule destination was created.
        public let createdAt: Date?
        /// Properties of the HTTP URL.
        public let httpUrlProperties: HttpUrlDestinationProperties?
        /// The date and time when the topic rule destination was last updated.
        public let lastUpdatedAt: Date?
        /// The status of the topic rule destination. Valid values are:  IN_PROGRESS  A topic rule destination was created but has not been confirmed. You can set status to IN_PROGRESS by calling UpdateTopicRuleDestination. Calling UpdateTopicRuleDestination causes a new confirmation challenge to be sent to your confirmation endpoint.  ENABLED  Confirmation was completed, and traffic to this destination is allowed. You can set status to DISABLED by calling UpdateTopicRuleDestination.  DISABLED  Confirmation was completed, and traffic to this destination is not allowed. You can set status to ENABLED by calling UpdateTopicRuleDestination.  ERROR  Confirmation could not be completed, for example if the confirmation timed out. You can call GetTopicRuleDestination for details about the error. You can set status to IN_PROGRESS by calling UpdateTopicRuleDestination. Calling UpdateTopicRuleDestination causes a new confirmation challenge to be sent to your confirmation endpoint.
        public let status: TopicRuleDestinationStatus?
        /// Additional details or reason why the topic rule destination is in the current status.
        public let statusReason: String?
        /// Properties of the virtual private cloud (VPC) connection.
        public let vpcProperties: VpcDestinationProperties?

        public init(arn: String? = nil, createdAt: Date? = nil, httpUrlProperties: HttpUrlDestinationProperties? = nil, lastUpdatedAt: Date? = nil, status: TopicRuleDestinationStatus? = nil, statusReason: String? = nil, vpcProperties: VpcDestinationProperties? = nil) {
            self.arn = arn
            self.createdAt = createdAt
            self.httpUrlProperties = httpUrlProperties
            self.lastUpdatedAt = lastUpdatedAt
            self.status = status
            self.statusReason = statusReason
            self.vpcProperties = vpcProperties
        }

        private enum CodingKeys: String, CodingKey {
            case arn
            case createdAt
            case httpUrlProperties
            case lastUpdatedAt
            case status
            case statusReason
            case vpcProperties
        }
    }

    public struct TopicRuleDestinationConfiguration: AWSEncodableShape {
        /// Configuration of the HTTP URL.
        public let httpUrlConfiguration: HttpUrlDestinationConfiguration?
        /// Configuration of the virtual private cloud (VPC) connection.
        public let vpcConfiguration: VpcDestinationConfiguration?

        public init(httpUrlConfiguration: HttpUrlDestinationConfiguration? = nil, vpcConfiguration: VpcDestinationConfiguration? = nil) {
            self.httpUrlConfiguration = httpUrlConfiguration
            self.vpcConfiguration = vpcConfiguration
        }

        public func validate(name: String) throws {
            try self.httpUrlConfiguration?.validate(name: "\(name).httpUrlConfiguration")
        }

        private enum CodingKeys: String, CodingKey {
            case httpUrlConfiguration
            case vpcConfiguration
        }
    }

    public struct TopicRuleDestinationSummary: AWSDecodableShape {
        /// The topic rule destination ARN.
        public let arn: String?
        /// The date and time when the topic rule destination was created.
        public let createdAt: Date?
        /// Information about the HTTP URL.
        public let httpUrlSummary: HttpUrlDestinationSummary?
        /// The date and time when the topic rule destination was last updated.
        public let lastUpdatedAt: Date?
        /// The status of the topic rule destination. Valid values are:  IN_PROGRESS  A topic rule destination was created but has not been confirmed. You can set status to IN_PROGRESS by calling UpdateTopicRuleDestination. Calling UpdateTopicRuleDestination causes a new confirmation challenge to be sent to your confirmation endpoint.  ENABLED  Confirmation was completed, and traffic to this destination is allowed. You can set status to DISABLED by calling UpdateTopicRuleDestination.  DISABLED  Confirmation was completed, and traffic to this destination is not allowed. You can set status to ENABLED by calling UpdateTopicRuleDestination.  ERROR  Confirmation could not be completed, for example if the confirmation timed out. You can call GetTopicRuleDestination for details about the error. You can set status to IN_PROGRESS by calling UpdateTopicRuleDestination. Calling UpdateTopicRuleDestination causes a new confirmation challenge to be sent to your confirmation endpoint.
        public let status: TopicRuleDestinationStatus?
        /// The reason the topic rule destination is in the current status.
        public let statusReason: String?
        /// Information about the virtual private cloud (VPC) connection.
        public let vpcDestinationSummary: VpcDestinationSummary?

        public init(arn: String? = nil, createdAt: Date? = nil, httpUrlSummary: HttpUrlDestinationSummary? = nil, lastUpdatedAt: Date? = nil, status: TopicRuleDestinationStatus? = nil, statusReason: String? = nil, vpcDestinationSummary: VpcDestinationSummary? = nil) {
            self.arn = arn
            self.createdAt = createdAt
            self.httpUrlSummary = httpUrlSummary
            self.lastUpdatedAt = lastUpdatedAt
            self.status = status
            self.statusReason = statusReason
            self.vpcDestinationSummary = vpcDestinationSummary
        }

        private enum CodingKeys: String, CodingKey {
            case arn
            case createdAt
            case httpUrlSummary
            case lastUpdatedAt
            case status
            case statusReason
            case vpcDestinationSummary
        }
    }

    public struct TopicRuleListItem: AWSDecodableShape {
        /// The date and time the rule was created.
        public let createdAt: Date?
        /// The rule ARN.
        public let ruleArn: String?
        /// Specifies whether the rule is disabled.
        public let ruleDisabled: Bool?
        /// The name of the rule.
        public let ruleName: String?
        /// The pattern for the topic names that apply.
        public let topicPattern: String?

        public init(createdAt: Date? = nil, ruleArn: String? = nil, ruleDisabled: Bool? = nil, ruleName: String? = nil, topicPattern: String? = nil) {
            self.createdAt = createdAt
            self.ruleArn = ruleArn
            self.ruleDisabled = ruleDisabled
            self.ruleName = ruleName
            self.topicPattern = topicPattern
        }

        private enum CodingKeys: String, CodingKey {
            case createdAt
            case ruleArn
            case ruleDisabled
            case ruleName
            case topicPattern
        }
    }

    public struct TopicRulePayload: AWSEncodableShape {
        /// The actions associated with the rule.
        public let actions: [Action]
        /// The version of the SQL rules engine to use when evaluating the rule.
        public let awsIotSqlVersion: String?
        /// The description of the rule.
        public let description: String?
        /// The action to take when an error occurs.
        public let errorAction: Action?
        /// Specifies whether the rule is disabled.
        public let ruleDisabled: Bool?
        /// The SQL statement used to query the topic. For more information, see AWS IoT SQL Reference in the AWS IoT Developer Guide.
        public let sql: String

        public init(actions: [Action], awsIotSqlVersion: String? = nil, description: String? = nil, errorAction: Action? = nil, ruleDisabled: Bool? = nil, sql: String) {
            self.actions = actions
            self.awsIotSqlVersion = awsIotSqlVersion
            self.description = description
            self.errorAction = errorAction
            self.ruleDisabled = ruleDisabled
            self.sql = sql
        }

        public func validate(name: String) throws {
            try self.actions.forEach {
                try $0.validate(name: "\(name).actions[]")
            }
            try self.validate(self.actions, name: "actions", parent: name, max: 10)
            try self.validate(self.actions, name: "actions", parent: name, min: 0)
            try self.errorAction?.validate(name: "\(name).errorAction")
        }

        private enum CodingKeys: String, CodingKey {
            case actions
            case awsIotSqlVersion
            case description
            case errorAction
            case ruleDisabled
            case sql
        }
    }

    public struct TransferCertificateRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "certificateId", location: .uri(locationName: "certificateId")),
            AWSMemberEncoding(label: "targetAwsAccount", location: .querystring(locationName: "targetAwsAccount"))
        ]

        /// The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)
        public let certificateId: String
        /// The AWS account.
        public let targetAwsAccount: String
        /// The transfer message.
        public let transferMessage: String?

        public init(certificateId: String, targetAwsAccount: String, transferMessage: String? = nil) {
            self.certificateId = certificateId
            self.targetAwsAccount = targetAwsAccount
            self.transferMessage = transferMessage
        }

        public func validate(name: String) throws {
            try self.validate(self.certificateId, name: "certificateId", parent: name, max: 64)
            try self.validate(self.certificateId, name: "certificateId", parent: name, min: 64)
            try self.validate(self.certificateId, name: "certificateId", parent: name, pattern: "(0x)?[a-fA-F0-9]+")
            try self.validate(self.targetAwsAccount, name: "targetAwsAccount", parent: name, max: 12)
            try self.validate(self.targetAwsAccount, name: "targetAwsAccount", parent: name, min: 12)
            try self.validate(self.targetAwsAccount, name: "targetAwsAccount", parent: name, pattern: "[0-9]+")
            try self.validate(self.transferMessage, name: "transferMessage", parent: name, max: 128)
        }

        private enum CodingKeys: String, CodingKey {
            case transferMessage
        }
    }

    public struct TransferCertificateResponse: AWSDecodableShape {
        /// The ARN of the certificate.
        public let transferredCertificateArn: String?

        public init(transferredCertificateArn: String? = nil) {
            self.transferredCertificateArn = transferredCertificateArn
        }

        private enum CodingKeys: String, CodingKey {
            case transferredCertificateArn
        }
    }

    public struct TransferData: AWSDecodableShape {
        /// The date the transfer was accepted.
        public let acceptDate: Date?
        /// The date the transfer was rejected.
        public let rejectDate: Date?
        /// The reason why the transfer was rejected.
        public let rejectReason: String?
        /// The date the transfer took place.
        public let transferDate: Date?
        /// The transfer message.
        public let transferMessage: String?

        public init(acceptDate: Date? = nil, rejectDate: Date? = nil, rejectReason: String? = nil, transferDate: Date? = nil, transferMessage: String? = nil) {
            self.acceptDate = acceptDate
            self.rejectDate = rejectDate
            self.rejectReason = rejectReason
            self.transferDate = transferDate
            self.transferMessage = transferMessage
        }

        private enum CodingKeys: String, CodingKey {
            case acceptDate
            case rejectDate
            case rejectReason
            case transferDate
            case transferMessage
        }
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        /// The ARN of the resource.
        public let resourceArn: String
        /// A list of the keys of the tags to be removed from the resource.
        public let tagKeys: [String]

        public init(resourceArn: String, tagKeys: [String]) {
            self.resourceArn = resourceArn
            self.tagKeys = tagKeys
        }

        public func validate(name: String) throws {
            try self.tagKeys.forEach {
                try validate($0, name: "tagKeys[]", parent: name, max: 128)
                try validate($0, name: "tagKeys[]", parent: name, min: 1)
                try validate($0, name: "tagKeys[]", parent: name, pattern: "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$")
            }
        }

        private enum CodingKeys: String, CodingKey {
            case resourceArn
            case tagKeys
        }
    }

    public struct UntagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateAccountAuditConfigurationRequest: AWSEncodableShape {
        /// Specifies which audit checks are enabled and disabled for this account. Use DescribeAccountAuditConfiguration to see the list of all checks, including those that are currently enabled. Some data collection might start immediately when certain checks are enabled. When a check is disabled, any data collected so far in relation to the check is deleted. You cannot disable a check if it's used by any scheduled audit. You must first delete the check from the scheduled audit or delete the scheduled audit itself. On the first call to UpdateAccountAuditConfiguration, this parameter is required and must specify at least one enabled check.
        public let auditCheckConfigurations: [String: AuditCheckConfiguration]?
        /// Information about the targets to which audit notifications are sent.
        public let auditNotificationTargetConfigurations: [AuditNotificationType: AuditNotificationTarget]?
        /// The Amazon Resource Name (ARN) of the role that grants permission to AWS IoT to access information about your devices, policies, certificates, and other items as required when performing an audit.
        public let roleArn: String?

        public init(auditCheckConfigurations: [String: AuditCheckConfiguration]? = nil, auditNotificationTargetConfigurations: [AuditNotificationType: AuditNotificationTarget]? = nil, roleArn: String? = nil) {
            self.auditCheckConfigurations = auditCheckConfigurations
            self.auditNotificationTargetConfigurations = auditNotificationTargetConfigurations
            self.roleArn = roleArn
        }

        public func validate(name: String) throws {
            try self.auditNotificationTargetConfigurations?.forEach {
                try $0.value.validate(name: "\(name).auditNotificationTargetConfigurations[\"\($0.key)\"]")
            }
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 20)
        }

        private enum CodingKeys: String, CodingKey {
            case auditCheckConfigurations
            case auditNotificationTargetConfigurations
            case roleArn
        }
    }

    public struct UpdateAccountAuditConfigurationResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateAuditSuppressionRequest: AWSEncodableShape {
        public let checkName: String
        ///  The description of the audit suppression.
        public let description: String?
        ///  The expiration date (epoch timestamp in seconds) that you want the suppression to adhere to.
        public let expirationDate: Date?
        public let resourceIdentifier: ResourceIdentifier
        ///  Indicates whether a suppression should exist indefinitely or not.
        public let suppressIndefinitely: Bool?

        public init(checkName: String, description: String? = nil, expirationDate: Date? = nil, resourceIdentifier: ResourceIdentifier, suppressIndefinitely: Bool? = nil) {
            self.checkName = checkName
            self.description = description
            self.expirationDate = expirationDate
            self.resourceIdentifier = resourceIdentifier
            self.suppressIndefinitely = suppressIndefinitely
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 1000)
            try self.validate(self.description, name: "description", parent: name, pattern: "[\\p{Graph}\\x20]*")
            try self.resourceIdentifier.validate(name: "\(name).resourceIdentifier")
        }

        private enum CodingKeys: String, CodingKey {
            case checkName
            case description
            case expirationDate
            case resourceIdentifier
            case suppressIndefinitely
        }
    }

    public struct UpdateAuditSuppressionResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateAuthorizerRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "authorizerName", location: .uri(locationName: "authorizerName"))
        ]

        /// The ARN of the authorizer's Lambda function.
        public let authorizerFunctionArn: String?
        /// The authorizer name.
        public let authorizerName: String
        /// The status of the update authorizer request.
        public let status: AuthorizerStatus?
        /// The key used to extract the token from the HTTP headers.
        public let tokenKeyName: String?
        /// The public keys used to verify the token signature.
        public let tokenSigningPublicKeys: [String: String]?

        public init(authorizerFunctionArn: String? = nil, authorizerName: String, status: AuthorizerStatus? = nil, tokenKeyName: String? = nil, tokenSigningPublicKeys: [String: String]? = nil) {
            self.authorizerFunctionArn = authorizerFunctionArn
            self.authorizerName = authorizerName
            self.status = status
            self.tokenKeyName = tokenKeyName
            self.tokenSigningPublicKeys = tokenSigningPublicKeys
        }

        public func validate(name: String) throws {
            try self.validate(self.authorizerFunctionArn, name: "authorizerFunctionArn", parent: name, max: 2048)
            try self.validate(self.authorizerName, name: "authorizerName", parent: name, max: 128)
            try self.validate(self.authorizerName, name: "authorizerName", parent: name, min: 1)
            try self.validate(self.authorizerName, name: "authorizerName", parent: name, pattern: "[\\w=,@-]+")
            try self.validate(self.tokenKeyName, name: "tokenKeyName", parent: name, max: 128)
            try self.validate(self.tokenKeyName, name: "tokenKeyName", parent: name, min: 1)
            try self.validate(self.tokenKeyName, name: "tokenKeyName", parent: name, pattern: "[a-zA-Z0-9_-]+")
            try self.tokenSigningPublicKeys?.forEach {
                try validate($0.key, name: "tokenSigningPublicKeys.key", parent: name, max: 128)
                try validate($0.key, name: "tokenSigningPublicKeys.key", parent: name, min: 1)
                try validate($0.key, name: "tokenSigningPublicKeys.key", parent: name, pattern: "[a-zA-Z0-9:_-]+")
                try validate($0.value, name: "tokenSigningPublicKeys[\"\($0.key)\"]", parent: name, max: 5120)
            }
        }

        private enum CodingKeys: String, CodingKey {
            case authorizerFunctionArn
            case status
            case tokenKeyName
            case tokenSigningPublicKeys
        }
    }

    public struct UpdateAuthorizerResponse: AWSDecodableShape {
        /// The authorizer ARN.
        public let authorizerArn: String?
        /// The authorizer name.
        public let authorizerName: String?

        public init(authorizerArn: String? = nil, authorizerName: String? = nil) {
            self.authorizerArn = authorizerArn
            self.authorizerName = authorizerName
        }

        private enum CodingKeys: String, CodingKey {
            case authorizerArn
            case authorizerName
        }
    }

    public struct UpdateBillingGroupRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "billingGroupName", location: .uri(locationName: "billingGroupName"))
        ]

        /// The name of the billing group.
        public let billingGroupName: String
        /// The properties of the billing group.
        public let billingGroupProperties: BillingGroupProperties
        /// The expected version of the billing group. If the version of the billing group does not match the expected version specified in the request, the UpdateBillingGroup request is rejected with a VersionConflictException.
        public let expectedVersion: Int64?

        public init(billingGroupName: String, billingGroupProperties: BillingGroupProperties, expectedVersion: Int64? = nil) {
            self.billingGroupName = billingGroupName
            self.billingGroupProperties = billingGroupProperties
            self.expectedVersion = expectedVersion
        }

        public func validate(name: String) throws {
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, max: 128)
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, min: 1)
            try self.validate(self.billingGroupName, name: "billingGroupName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
            try self.billingGroupProperties.validate(name: "\(name).billingGroupProperties")
        }

        private enum CodingKeys: String, CodingKey {
            case billingGroupProperties
            case expectedVersion
        }
    }

    public struct UpdateBillingGroupResponse: AWSDecodableShape {
        /// The latest version of the billing group.
        public let version: Int64?

        public init(version: Int64? = nil) {
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case version
        }
    }

    public struct UpdateCACertificateParams: AWSEncodableShape & AWSDecodableShape {
        /// The action that you want to apply to the CA certificate. The only supported value is DEACTIVATE.
        public let action: CACertificateUpdateAction

        public init(action: CACertificateUpdateAction) {
            self.action = action
        }

        private enum CodingKeys: String, CodingKey {
            case action
        }
    }

    public struct UpdateCACertificateRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "certificateId", location: .uri(locationName: "caCertificateId")),
            AWSMemberEncoding(label: "newAutoRegistrationStatus", location: .querystring(locationName: "newAutoRegistrationStatus")),
            AWSMemberEncoding(label: "newStatus", location: .querystring(locationName: "newStatus"))
        ]

        /// The CA certificate identifier.
        public let certificateId: String
        /// The new value for the auto registration status. Valid values are: "ENABLE" or "DISABLE".
        public let newAutoRegistrationStatus: AutoRegistrationStatus?
        /// The updated status of the CA certificate.  Note: The status value REGISTER_INACTIVE is deprecated and should not be used.
        public let newStatus: CACertificateStatus?
        /// Information about the registration configuration.
        public let registrationConfig: RegistrationConfig?
        /// If true, removes auto registration.
        public let removeAutoRegistration: Bool?

        public init(certificateId: String, newAutoRegistrationStatus: AutoRegistrationStatus? = nil, newStatus: CACertificateStatus? = nil, registrationConfig: RegistrationConfig? = nil, removeAutoRegistration: Bool? = nil) {
            self.certificateId = certificateId
            self.newAutoRegistrationStatus = newAutoRegistrationStatus
            self.newStatus = newStatus
            self.registrationConfig = registrationConfig
            self.removeAutoRegistration = removeAutoRegistration
        }

        public func validate(name: String) throws {
            try self.validate(self.certificateId, name: "certificateId", parent: name, max: 64)
            try self.validate(self.certificateId, name: "certificateId", parent: name, min: 64)
            try self.validate(self.certificateId, name: "certificateId", parent: name, pattern: "(0x)?[a-fA-F0-9]+")
            try self.registrationConfig?.validate(name: "\(name).registrationConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case registrationConfig
            case removeAutoRegistration
        }
    }

    public struct UpdateCertificateRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "certificateId", location: .uri(locationName: "certificateId")),
            AWSMemberEncoding(label: "newStatus", location: .querystring(locationName: "newStatus"))
        ]

        /// The ID of the certificate. (The last part of the certificate ARN contains the certificate ID.)
        public let certificateId: String
        /// The new status.  Note: Setting the status to PENDING_TRANSFER or PENDING_ACTIVATION will result in an exception being thrown. PENDING_TRANSFER and PENDING_ACTIVATION are statuses used internally by AWS IoT. They are not intended for developer use.  Note: The status value REGISTER_INACTIVE is deprecated and should not be used.
        public let newStatus: CertificateStatus

        public init(certificateId: String, newStatus: CertificateStatus) {
            self.certificateId = certificateId
            self.newStatus = newStatus
        }

        public func validate(name: String) throws {
            try self.validate(self.certificateId, name: "certificateId", parent: name, max: 64)
            try self.validate(self.certificateId, name: "certificateId", parent: name, min: 64)
            try self.validate(self.certificateId, name: "certificateId", parent: name, pattern: "(0x)?[a-fA-F0-9]+")
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct UpdateCustomMetricRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "metricName", location: .uri(locationName: "metricName"))
        ]

        ///  Field represents a friendly name in the console for the custom metric, it doesn't have to be unique. Don't use this name as the metric identifier in the device metric report. Can be updated.
        public let displayName: String
        ///  The name of the custom metric. Cannot be updated.
        public let metricName: String

        public init(displayName: String, metricName: String) {
            self.displayName = displayName
            self.metricName = metricName
        }

        public func validate(name: String) throws {
            try self.validate(self.displayName, name: "displayName", parent: name, max: 128)
            try self.validate(self.displayName, name: "displayName", parent: name, pattern: "[\\p{Graph}\\x20]*")
            try self.validate(self.metricName, name: "metricName", parent: name, max: 128)
            try self.validate(self.metricName, name: "metricName", parent: name, min: 1)
            try self.validate(self.metricName, name: "metricName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case displayName
        }
    }

    public struct UpdateCustomMetricResponse: AWSDecodableShape {
        ///  The creation date of the custom metric in milliseconds since epoch.
        public let creationDate: Date?
        ///  A friendly name in the console for the custom metric
        public let displayName: String?
        ///  The time the custom metric was last modified in milliseconds since epoch.
        public let lastModifiedDate: Date?
        ///  The Amazon Resource Number (ARN) of the custom metric.
        public let metricArn: String?
        ///  The name of the custom metric.
        public let metricName: String?
        ///  The type of the custom metric. Types include string-list, ip-address-list, number-list, and number.
        public let metricType: CustomMetricType?

        public init(creationDate: Date? = nil, displayName: String? = nil, lastModifiedDate: Date? = nil, metricArn: String? = nil, metricName: String? = nil, metricType: CustomMetricType? = nil) {
            self.creationDate = creationDate
            self.displayName = displayName
            self.lastModifiedDate = lastModifiedDate
            self.metricArn = metricArn
            self.metricName = metricName
            self.metricType = metricType
        }

        private enum CodingKeys: String, CodingKey {
            case creationDate
            case displayName
            case lastModifiedDate
            case metricArn
            case metricName
            case metricType
        }
    }

    public struct UpdateDeviceCertificateParams: AWSEncodableShape & AWSDecodableShape {
        /// The action that you want to apply to the device certificate. The only supported value is DEACTIVATE.
        public let action: DeviceCertificateUpdateAction

        public init(action: DeviceCertificateUpdateAction) {
            self.action = action
        }

        private enum CodingKeys: String, CodingKey {
            case action
        }
    }

    public struct UpdateDimensionRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "name", location: .uri(locationName: "name"))
        ]

        /// A unique identifier for the dimension. Choose something that describes the type and value to make it easy to remember what it does.
        public let name: String
        /// Specifies the value or list of values for the dimension. For TOPIC_FILTER dimensions, this is a pattern used to match the MQTT topic (for example, "admin/#").
        public let stringValues: [String]

        public init(name: String, stringValues: [String]) {
            self.name = name
            self.stringValues = stringValues
        }

        public func validate(name: String) throws {
            try self.validate(self.name, name: "name", parent: name, max: 128)
            try self.validate(self.name, name: "name", parent: name, min: 1)
            try self.validate(self.name, name: "name", parent: name, pattern: "[a-zA-Z0-9:_-]+")
            try self.stringValues.forEach {
                try validate($0, name: "stringValues[]", parent: name, max: 256)
                try validate($0, name: "stringValues[]", parent: name, min: 1)
            }
            try self.validate(self.stringValues, name: "stringValues", parent: name, max: 100)
            try self.validate(self.stringValues, name: "stringValues", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case stringValues
        }
    }

    public struct UpdateDimensionResponse: AWSDecodableShape {
        /// The Amazon Resource Name (ARN)of the created dimension.
        public let arn: String?
        /// The date and time, in milliseconds since epoch, when the dimension was initially created.
        public let creationDate: Date?
        /// The date and time, in milliseconds since epoch, when the dimension was most recently updated.
        public let lastModifiedDate: Date?
        /// A unique identifier for the dimension.
        public let name: String?
        /// The value or list of values used to scope the dimension. For example, for topic filters, this is the pattern used to match the MQTT topic name.
        public let stringValues: [String]?
        /// The type of the dimension.
        public let type: DimensionType?

        public init(arn: String? = nil, creationDate: Date? = nil, lastModifiedDate: Date? = nil, name: String? = nil, stringValues: [String]? = nil, type: DimensionType? = nil) {
            self.arn = arn
            self.creationDate = creationDate
            self.lastModifiedDate = lastModifiedDate
            self.name = name
            self.stringValues = stringValues
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case arn
            case creationDate
            case lastModifiedDate
            case name
            case stringValues
            case type
        }
    }

    public struct UpdateDomainConfigurationRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "domainConfigurationName", location: .uri(locationName: "domainConfigurationName"))
        ]

        /// An object that specifies the authorization service for a domain.
        public let authorizerConfig: AuthorizerConfig?
        /// The name of the domain configuration to be updated.
        public let domainConfigurationName: String
        /// The status to which the domain configuration should be updated.
        public let domainConfigurationStatus: DomainConfigurationStatus?
        /// Removes the authorization configuration from a domain.
        public let removeAuthorizerConfig: Bool?

        public init(authorizerConfig: AuthorizerConfig? = nil, domainConfigurationName: String, domainConfigurationStatus: DomainConfigurationStatus? = nil, removeAuthorizerConfig: Bool? = nil) {
            self.authorizerConfig = authorizerConfig
            self.domainConfigurationName = domainConfigurationName
            self.domainConfigurationStatus = domainConfigurationStatus
            self.removeAuthorizerConfig = removeAuthorizerConfig
        }

        public func validate(name: String) throws {
            try self.authorizerConfig?.validate(name: "\(name).authorizerConfig")
            try self.validate(self.domainConfigurationName, name: "domainConfigurationName", parent: name, max: 128)
            try self.validate(self.domainConfigurationName, name: "domainConfigurationName", parent: name, min: 1)
            try self.validate(self.domainConfigurationName, name: "domainConfigurationName", parent: name, pattern: "[\\w.:-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case authorizerConfig
            case domainConfigurationStatus
            case removeAuthorizerConfig
        }
    }

    public struct UpdateDomainConfigurationResponse: AWSDecodableShape {
        /// The ARN of the domain configuration that was updated.
        public let domainConfigurationArn: String?
        /// The name of the domain configuration that was updated.
        public let domainConfigurationName: String?

        public init(domainConfigurationArn: String? = nil, domainConfigurationName: String? = nil) {
            self.domainConfigurationArn = domainConfigurationArn
            self.domainConfigurationName = domainConfigurationName
        }

        private enum CodingKeys: String, CodingKey {
            case domainConfigurationArn
            case domainConfigurationName
        }
    }

    public struct UpdateDynamicThingGroupRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "thingGroupName", location: .uri(locationName: "thingGroupName"))
        ]

        /// The expected version of the dynamic thing group to update.
        public let expectedVersion: Int64?
        /// The dynamic thing group index to update.  Currently one index is supported: 'AWS_Things'.
        public let indexName: String?
        /// The dynamic thing group search query string to update.
        public let queryString: String?
        /// The dynamic thing group query version to update.  Currently one query version is supported: "2017-09-30". If not specified, the query version defaults to this value.
        public let queryVersion: String?
        /// The name of the dynamic thing group to update.
        public let thingGroupName: String
        /// The dynamic thing group properties to update.
        public let thingGroupProperties: ThingGroupProperties

        public init(expectedVersion: Int64? = nil, indexName: String? = nil, queryString: String? = nil, queryVersion: String? = nil, thingGroupName: String, thingGroupProperties: ThingGroupProperties) {
            self.expectedVersion = expectedVersion
            self.indexName = indexName
            self.queryString = queryString
            self.queryVersion = queryVersion
            self.thingGroupName = thingGroupName
            self.thingGroupProperties = thingGroupProperties
        }

        public func validate(name: String) throws {
            try self.validate(self.indexName, name: "indexName", parent: name, max: 128)
            try self.validate(self.indexName, name: "indexName", parent: name, min: 1)
            try self.validate(self.indexName, name: "indexName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
            try self.validate(self.queryString, name: "queryString", parent: name, min: 1)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, max: 128)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, min: 1)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
            try self.thingGroupProperties.validate(name: "\(name).thingGroupProperties")
        }

        private enum CodingKeys: String, CodingKey {
            case expectedVersion
            case indexName
            case queryString
            case queryVersion
            case thingGroupProperties
        }
    }

    public struct UpdateDynamicThingGroupResponse: AWSDecodableShape {
        /// The dynamic thing group version.
        public let version: Int64?

        public init(version: Int64? = nil) {
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case version
        }
    }

    public struct UpdateEventConfigurationsRequest: AWSEncodableShape {
        /// The new event configuration values.
        public let eventConfigurations: [EventType: Configuration]?

        public init(eventConfigurations: [EventType: Configuration]? = nil) {
            self.eventConfigurations = eventConfigurations
        }

        private enum CodingKeys: String, CodingKey {
            case eventConfigurations
        }
    }

    public struct UpdateEventConfigurationsResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateIndexingConfigurationRequest: AWSEncodableShape {
        /// Thing group indexing configuration.
        public let thingGroupIndexingConfiguration: ThingGroupIndexingConfiguration?
        /// Thing indexing configuration.
        public let thingIndexingConfiguration: ThingIndexingConfiguration?

        public init(thingGroupIndexingConfiguration: ThingGroupIndexingConfiguration? = nil, thingIndexingConfiguration: ThingIndexingConfiguration? = nil) {
            self.thingGroupIndexingConfiguration = thingGroupIndexingConfiguration
            self.thingIndexingConfiguration = thingIndexingConfiguration
        }

        private enum CodingKeys: String, CodingKey {
            case thingGroupIndexingConfiguration
            case thingIndexingConfiguration
        }
    }

    public struct UpdateIndexingConfigurationResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateJobRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "jobId", location: .uri(locationName: "jobId")),
            AWSMemberEncoding(label: "namespaceId", location: .querystring(locationName: "namespaceId"))
        ]

        /// Allows you to create criteria to abort a job.
        public let abortConfig: AbortConfig?
        /// A short text description of the job.
        public let description: String?
        /// Allows you to create a staged rollout of the job.
        public let jobExecutionsRolloutConfig: JobExecutionsRolloutConfig?
        /// The ID of the job to be updated.
        public let jobId: String
        /// The namespace used to indicate that a job is a customer-managed job. When you specify a value for this parameter, AWS IoT Core sends jobs notifications to MQTT topics that contain the value in the following format.  $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/   The namespaceId feature is in public preview.
        public let namespaceId: String?
        /// Configuration information for pre-signed S3 URLs.
        public let presignedUrlConfig: PresignedUrlConfig?
        /// Specifies the amount of time each device has to finish its execution of the job. The timer is started when the job execution status is set to IN_PROGRESS. If the job execution status is not set to another terminal state before the time expires, it will be automatically set to TIMED_OUT.
        public let timeoutConfig: TimeoutConfig?

        public init(abortConfig: AbortConfig? = nil, description: String? = nil, jobExecutionsRolloutConfig: JobExecutionsRolloutConfig? = nil, jobId: String, namespaceId: String? = nil, presignedUrlConfig: PresignedUrlConfig? = nil, timeoutConfig: TimeoutConfig? = nil) {
            self.abortConfig = abortConfig
            self.description = description
            self.jobExecutionsRolloutConfig = jobExecutionsRolloutConfig
            self.jobId = jobId
            self.namespaceId = namespaceId
            self.presignedUrlConfig = presignedUrlConfig
            self.timeoutConfig = timeoutConfig
        }

        public func validate(name: String) throws {
            try self.abortConfig?.validate(name: "\(name).abortConfig")
            try self.validate(self.description, name: "description", parent: name, max: 2028)
            try self.validate(self.description, name: "description", parent: name, pattern: "[^\\p{C}]+")
            try self.jobExecutionsRolloutConfig?.validate(name: "\(name).jobExecutionsRolloutConfig")
            try self.validate(self.jobId, name: "jobId", parent: name, max: 64)
            try self.validate(self.jobId, name: "jobId", parent: name, min: 1)
            try self.validate(self.jobId, name: "jobId", parent: name, pattern: "[a-zA-Z0-9_-]+")
            try self.validate(self.namespaceId, name: "namespaceId", parent: name, max: 64)
            try self.validate(self.namespaceId, name: "namespaceId", parent: name, min: 1)
            try self.validate(self.namespaceId, name: "namespaceId", parent: name, pattern: "[a-zA-Z0-9_-]+")
            try self.presignedUrlConfig?.validate(name: "\(name).presignedUrlConfig")
        }

        private enum CodingKeys: String, CodingKey {
            case abortConfig
            case description
            case jobExecutionsRolloutConfig
            case presignedUrlConfig
            case timeoutConfig
        }
    }

    public struct UpdateMitigationActionRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "actionName", location: .uri(locationName: "actionName"))
        ]

        /// The friendly name for the mitigation action. You cannot change the name by using UpdateMitigationAction. Instead, you must delete and recreate the mitigation action with the new name.
        public let actionName: String
        /// Defines the type of action and the parameters for that action.
        public let actionParams: MitigationActionParams?
        /// The ARN of the IAM role that is used to apply the mitigation action.
        public let roleArn: String?

        public init(actionName: String, actionParams: MitigationActionParams? = nil, roleArn: String? = nil) {
            self.actionName = actionName
            self.actionParams = actionParams
            self.roleArn = roleArn
        }

        public func validate(name: String) throws {
            try self.validate(self.actionName, name: "actionName", parent: name, max: 128)
            try self.validate(self.actionName, name: "actionName", parent: name, pattern: "[a-zA-Z0-9_-]+")
            try self.actionParams?.validate(name: "\(name).actionParams")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 20)
        }

        private enum CodingKeys: String, CodingKey {
            case actionParams
            case roleArn
        }
    }

    public struct UpdateMitigationActionResponse: AWSDecodableShape {
        /// The ARN for the new mitigation action.
        public let actionArn: String?
        /// A unique identifier for the mitigation action.
        public let actionId: String?

        public init(actionArn: String? = nil, actionId: String? = nil) {
            self.actionArn = actionArn
            self.actionId = actionId
        }

        private enum CodingKeys: String, CodingKey {
            case actionArn
            case actionId
        }
    }

    public struct UpdateProvisioningTemplateRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "templateName", location: .uri(locationName: "templateName"))
        ]

        /// The ID of the default provisioning template version.
        public let defaultVersionId: Int?
        /// The description of the fleet provisioning template.
        public let description: String?
        /// True to enable the fleet provisioning template, otherwise false.
        public let enabled: Bool?
        /// Updates the pre-provisioning hook template.
        public let preProvisioningHook: ProvisioningHook?
        /// The ARN of the role associated with the provisioning template. This IoT role grants permission to provision a device.
        public let provisioningRoleArn: String?
        /// Removes pre-provisioning hook template.
        public let removePreProvisioningHook: Bool?
        /// The name of the fleet provisioning template.
        public let templateName: String

        public init(defaultVersionId: Int? = nil, description: String? = nil, enabled: Bool? = nil, preProvisioningHook: ProvisioningHook? = nil, provisioningRoleArn: String? = nil, removePreProvisioningHook: Bool? = nil, templateName: String) {
            self.defaultVersionId = defaultVersionId
            self.description = description
            self.enabled = enabled
            self.preProvisioningHook = preProvisioningHook
            self.provisioningRoleArn = provisioningRoleArn
            self.removePreProvisioningHook = removePreProvisioningHook
            self.templateName = templateName
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 500)
            try self.validate(self.description, name: "description", parent: name, min: 0)
            try self.validate(self.description, name: "description", parent: name, pattern: "[^\\p{C}]*")
            try self.preProvisioningHook?.validate(name: "\(name).preProvisioningHook")
            try self.validate(self.provisioningRoleArn, name: "provisioningRoleArn", parent: name, max: 2048)
            try self.validate(self.provisioningRoleArn, name: "provisioningRoleArn", parent: name, min: 20)
            try self.validate(self.templateName, name: "templateName", parent: name, max: 36)
            try self.validate(self.templateName, name: "templateName", parent: name, min: 1)
            try self.validate(self.templateName, name: "templateName", parent: name, pattern: "^[0-9A-Za-z_-]+$")
        }

        private enum CodingKeys: String, CodingKey {
            case defaultVersionId
            case description
            case enabled
            case preProvisioningHook
            case provisioningRoleArn
            case removePreProvisioningHook
        }
    }

    public struct UpdateProvisioningTemplateResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateRoleAliasRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "roleAlias", location: .uri(locationName: "roleAlias"))
        ]

        /// The number of seconds the credential will be valid.
        public let credentialDurationSeconds: Int?
        /// The role alias to update.
        public let roleAlias: String
        /// The role ARN.
        public let roleArn: String?

        public init(credentialDurationSeconds: Int? = nil, roleAlias: String, roleArn: String? = nil) {
            self.credentialDurationSeconds = credentialDurationSeconds
            self.roleAlias = roleAlias
            self.roleArn = roleArn
        }

        public func validate(name: String) throws {
            try self.validate(self.credentialDurationSeconds, name: "credentialDurationSeconds", parent: name, max: 3600)
            try self.validate(self.credentialDurationSeconds, name: "credentialDurationSeconds", parent: name, min: 900)
            try self.validate(self.roleAlias, name: "roleAlias", parent: name, max: 128)
            try self.validate(self.roleAlias, name: "roleAlias", parent: name, min: 1)
            try self.validate(self.roleAlias, name: "roleAlias", parent: name, pattern: "[\\w=,@-]+")
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 20)
        }

        private enum CodingKeys: String, CodingKey {
            case credentialDurationSeconds
            case roleArn
        }
    }

    public struct UpdateRoleAliasResponse: AWSDecodableShape {
        /// The role alias.
        public let roleAlias: String?
        /// The role alias ARN.
        public let roleAliasArn: String?

        public init(roleAlias: String? = nil, roleAliasArn: String? = nil) {
            self.roleAlias = roleAlias
            self.roleAliasArn = roleAliasArn
        }

        private enum CodingKeys: String, CodingKey {
            case roleAlias
            case roleAliasArn
        }
    }

    public struct UpdateScheduledAuditRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "scheduledAuditName", location: .uri(locationName: "scheduledAuditName"))
        ]

        /// The day of the month on which the scheduled audit takes place. This can be 1 through 31 or LAST. This field is required if the frequency parameter is set to MONTHLY. If days 29-31 are specified, and the month does not have that many days, the audit takes place on the "LAST" day of the month.
        public let dayOfMonth: String?
        /// The day of the week on which the scheduled audit takes place. This can be one of SUN, MON, TUE, WED, THU, FRI, or SAT. This field is required if the "frequency" parameter is set to WEEKLY or BIWEEKLY.
        public let dayOfWeek: DayOfWeek?
        /// How often the scheduled audit takes place, either DAILY, WEEKLY, BIWEEKLY, or MONTHLY. The start time of each audit is determined by the system.
        public let frequency: AuditFrequency?
        /// The name of the scheduled audit. (Max. 128 chars)
        public let scheduledAuditName: String
        /// Which checks are performed during the scheduled audit. Checks must be enabled for your account. (Use DescribeAccountAuditConfiguration to see the list of all checks, including those that are enabled or use UpdateAccountAuditConfiguration to select which checks are enabled.)
        public let targetCheckNames: [String]?

        public init(dayOfMonth: String? = nil, dayOfWeek: DayOfWeek? = nil, frequency: AuditFrequency? = nil, scheduledAuditName: String, targetCheckNames: [String]? = nil) {
            self.dayOfMonth = dayOfMonth
            self.dayOfWeek = dayOfWeek
            self.frequency = frequency
            self.scheduledAuditName = scheduledAuditName
            self.targetCheckNames = targetCheckNames
        }

        public func validate(name: String) throws {
            try self.validate(self.dayOfMonth, name: "dayOfMonth", parent: name, pattern: "^([1-9]|[12][0-9]|3[01])$|^LAST$")
            try self.validate(self.scheduledAuditName, name: "scheduledAuditName", parent: name, max: 128)
            try self.validate(self.scheduledAuditName, name: "scheduledAuditName", parent: name, min: 1)
            try self.validate(self.scheduledAuditName, name: "scheduledAuditName", parent: name, pattern: "[a-zA-Z0-9_-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case dayOfMonth
            case dayOfWeek
            case frequency
            case targetCheckNames
        }
    }

    public struct UpdateScheduledAuditResponse: AWSDecodableShape {
        /// The ARN of the scheduled audit.
        public let scheduledAuditArn: String?

        public init(scheduledAuditArn: String? = nil) {
            self.scheduledAuditArn = scheduledAuditArn
        }

        private enum CodingKeys: String, CodingKey {
            case scheduledAuditArn
        }
    }

    public struct UpdateSecurityProfileRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "expectedVersion", location: .querystring(locationName: "expectedVersion")),
            AWSMemberEncoding(label: "securityProfileName", location: .uri(locationName: "securityProfileName"))
        ]

        /// A list of metrics whose data is retained (stored). By default, data is retained for any metric used in the profile's behaviors, but it is also retained for any metric specified here. Can be used with custom metrics; cannot be used with dimensions.
        public let additionalMetricsToRetainV2: [MetricToRetain]?
        /// Where the alerts are sent. (Alerts are always sent to the console.)
        public let alertTargets: [AlertTargetType: AlertTarget]?
        /// Specifies the behaviors that, when violated by a device (thing), cause an alert.
        public let behaviors: [Behavior]?
        /// If true, delete all additionalMetricsToRetain defined for this security profile. If any additionalMetricsToRetain are defined in the current invocation, an exception occurs.
        public let deleteAdditionalMetricsToRetain: Bool?
        /// If true, delete all alertTargets defined for this security profile. If any alertTargets are defined in the current invocation, an exception occurs.
        public let deleteAlertTargets: Bool?
        /// If true, delete all behaviors defined for this security profile. If any behaviors are defined in the current invocation, an exception occurs.
        public let deleteBehaviors: Bool?
        /// The expected version of the security profile. A new version is generated whenever the security profile is updated. If you specify a value that is different from the actual version, a VersionConflictException is thrown.
        public let expectedVersion: Int64?
        /// A description of the security profile.
        public let securityProfileDescription: String?
        /// The name of the security profile you want to update.
        public let securityProfileName: String

        public init(additionalMetricsToRetainV2: [MetricToRetain]? = nil, alertTargets: [AlertTargetType: AlertTarget]? = nil, behaviors: [Behavior]? = nil, deleteAdditionalMetricsToRetain: Bool? = nil, deleteAlertTargets: Bool? = nil, deleteBehaviors: Bool? = nil, expectedVersion: Int64? = nil, securityProfileDescription: String? = nil, securityProfileName: String) {
            self.additionalMetricsToRetainV2 = additionalMetricsToRetainV2
            self.alertTargets = alertTargets
            self.behaviors = behaviors
            self.deleteAdditionalMetricsToRetain = deleteAdditionalMetricsToRetain
            self.deleteAlertTargets = deleteAlertTargets
            self.deleteBehaviors = deleteBehaviors
            self.expectedVersion = expectedVersion
            self.securityProfileDescription = securityProfileDescription
            self.securityProfileName = securityProfileName
        }

        public func validate(name: String) throws {
            try self.additionalMetricsToRetainV2?.forEach {
                try $0.validate(name: "\(name).additionalMetricsToRetainV2[]")
            }
            try self.alertTargets?.forEach {
                try $0.value.validate(name: "\(name).alertTargets[\"\($0.key)\"]")
            }
            try self.behaviors?.forEach {
                try $0.validate(name: "\(name).behaviors[]")
            }
            try self.validate(self.behaviors, name: "behaviors", parent: name, max: 100)
            try self.validate(self.securityProfileDescription, name: "securityProfileDescription", parent: name, max: 1000)
            try self.validate(self.securityProfileDescription, name: "securityProfileDescription", parent: name, pattern: "[\\p{Graph}\\x20]*")
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, max: 128)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, min: 1)
            try self.validate(self.securityProfileName, name: "securityProfileName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case additionalMetricsToRetainV2
            case alertTargets
            case behaviors
            case deleteAdditionalMetricsToRetain
            case deleteAlertTargets
            case deleteBehaviors
            case securityProfileDescription
        }
    }

    public struct UpdateSecurityProfileResponse: AWSDecodableShape {
        /// A list of metrics whose data is retained (stored). By default, data is retained for any metric used in the profile's behaviors, but it is also retained for any metric specified here. Can be used with custom metrics; cannot be used with dimensions.
        public let additionalMetricsToRetainV2: [MetricToRetain]?
        /// Where the alerts are sent. (Alerts are always sent to the console.)
        public let alertTargets: [AlertTargetType: AlertTarget]?
        /// Specifies the behaviors that, when violated by a device (thing), cause an alert.
        public let behaviors: [Behavior]?
        /// The time the security profile was created.
        public let creationDate: Date?
        /// The time the security profile was last modified.
        public let lastModifiedDate: Date?
        /// The ARN of the security profile that was updated.
        public let securityProfileArn: String?
        /// The description of the security profile.
        public let securityProfileDescription: String?
        /// The name of the security profile that was updated.
        public let securityProfileName: String?
        /// The updated version of the security profile.
        public let version: Int64?

        public init(additionalMetricsToRetainV2: [MetricToRetain]? = nil, alertTargets: [AlertTargetType: AlertTarget]? = nil, behaviors: [Behavior]? = nil, creationDate: Date? = nil, lastModifiedDate: Date? = nil, securityProfileArn: String? = nil, securityProfileDescription: String? = nil, securityProfileName: String? = nil, version: Int64? = nil) {
            self.additionalMetricsToRetainV2 = additionalMetricsToRetainV2
            self.alertTargets = alertTargets
            self.behaviors = behaviors
            self.creationDate = creationDate
            self.lastModifiedDate = lastModifiedDate
            self.securityProfileArn = securityProfileArn
            self.securityProfileDescription = securityProfileDescription
            self.securityProfileName = securityProfileName
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case additionalMetricsToRetainV2
            case alertTargets
            case behaviors
            case creationDate
            case lastModifiedDate
            case securityProfileArn
            case securityProfileDescription
            case securityProfileName
            case version
        }
    }

    public struct UpdateStreamRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "streamId", location: .uri(locationName: "streamId"))
        ]

        /// The description of the stream.
        public let description: String?
        /// The files associated with the stream.
        public let files: [StreamFile]?
        /// An IAM role that allows the IoT service principal assumes to access your S3 files.
        public let roleArn: String?
        /// The stream ID.
        public let streamId: String

        public init(description: String? = nil, files: [StreamFile]? = nil, roleArn: String? = nil, streamId: String) {
            self.description = description
            self.files = files
            self.roleArn = roleArn
            self.streamId = streamId
        }

        public func validate(name: String) throws {
            try self.validate(self.description, name: "description", parent: name, max: 2028)
            try self.validate(self.description, name: "description", parent: name, pattern: "[^\\p{C}]+")
            try self.files?.forEach {
                try $0.validate(name: "\(name).files[]")
            }
            try self.validate(self.files, name: "files", parent: name, max: 50)
            try self.validate(self.files, name: "files", parent: name, min: 1)
            try self.validate(self.roleArn, name: "roleArn", parent: name, max: 2048)
            try self.validate(self.roleArn, name: "roleArn", parent: name, min: 20)
            try self.validate(self.streamId, name: "streamId", parent: name, max: 128)
            try self.validate(self.streamId, name: "streamId", parent: name, min: 1)
            try self.validate(self.streamId, name: "streamId", parent: name, pattern: "[a-zA-Z0-9_-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case files
            case roleArn
        }
    }

    public struct UpdateStreamResponse: AWSDecodableShape {
        /// A description of the stream.
        public let description: String?
        /// The stream ARN.
        public let streamArn: String?
        /// The stream ID.
        public let streamId: String?
        /// The stream version.
        public let streamVersion: Int?

        public init(description: String? = nil, streamArn: String? = nil, streamId: String? = nil, streamVersion: Int? = nil) {
            self.description = description
            self.streamArn = streamArn
            self.streamId = streamId
            self.streamVersion = streamVersion
        }

        private enum CodingKeys: String, CodingKey {
            case description
            case streamArn
            case streamId
            case streamVersion
        }
    }

    public struct UpdateThingGroupRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "thingGroupName", location: .uri(locationName: "thingGroupName"))
        ]

        /// The expected version of the thing group. If this does not match the version of the thing group being updated, the update will fail.
        public let expectedVersion: Int64?
        /// The thing group to update.
        public let thingGroupName: String
        /// The thing group properties.
        public let thingGroupProperties: ThingGroupProperties

        public init(expectedVersion: Int64? = nil, thingGroupName: String, thingGroupProperties: ThingGroupProperties) {
            self.expectedVersion = expectedVersion
            self.thingGroupName = thingGroupName
            self.thingGroupProperties = thingGroupProperties
        }

        public func validate(name: String) throws {
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, max: 128)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, min: 1)
            try self.validate(self.thingGroupName, name: "thingGroupName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
            try self.thingGroupProperties.validate(name: "\(name).thingGroupProperties")
        }

        private enum CodingKeys: String, CodingKey {
            case expectedVersion
            case thingGroupProperties
        }
    }

    public struct UpdateThingGroupResponse: AWSDecodableShape {
        /// The version of the updated thing group.
        public let version: Int64?

        public init(version: Int64? = nil) {
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case version
        }
    }

    public struct UpdateThingGroupsForThingRequest: AWSEncodableShape {
        /// Override dynamic thing groups with static thing groups when 10-group limit is reached. If a thing belongs to 10 thing groups, and one or more of those groups are dynamic thing groups, adding a thing to a static group removes the thing from the last dynamic group.
        public let overrideDynamicGroups: Bool?
        /// The groups to which the thing will be added.
        public let thingGroupsToAdd: [String]?
        /// The groups from which the thing will be removed.
        public let thingGroupsToRemove: [String]?
        /// The thing whose group memberships will be updated.
        public let thingName: String?

        public init(overrideDynamicGroups: Bool? = nil, thingGroupsToAdd: [String]? = nil, thingGroupsToRemove: [String]? = nil, thingName: String? = nil) {
            self.overrideDynamicGroups = overrideDynamicGroups
            self.thingGroupsToAdd = thingGroupsToAdd
            self.thingGroupsToRemove = thingGroupsToRemove
            self.thingName = thingName
        }

        public func validate(name: String) throws {
            try self.thingGroupsToAdd?.forEach {
                try validate($0, name: "thingGroupsToAdd[]", parent: name, max: 128)
                try validate($0, name: "thingGroupsToAdd[]", parent: name, min: 1)
                try validate($0, name: "thingGroupsToAdd[]", parent: name, pattern: "[a-zA-Z0-9:_-]+")
            }
            try self.thingGroupsToRemove?.forEach {
                try validate($0, name: "thingGroupsToRemove[]", parent: name, max: 128)
                try validate($0, name: "thingGroupsToRemove[]", parent: name, min: 1)
                try validate($0, name: "thingGroupsToRemove[]", parent: name, pattern: "[a-zA-Z0-9:_-]+")
            }
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case overrideDynamicGroups
            case thingGroupsToAdd
            case thingGroupsToRemove
            case thingName
        }
    }

    public struct UpdateThingGroupsForThingResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateThingRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "thingName", location: .uri(locationName: "thingName"))
        ]

        /// A list of thing attributes, a JSON string containing name-value pairs. For example:  {\"attributes\":{\"name1\":\"value2\"}}  This data is used to add new attributes or update existing attributes.
        public let attributePayload: AttributePayload?
        /// The expected version of the thing record in the registry. If the version of the record in the registry does not match the expected version specified in the request, the UpdateThing request is rejected with a VersionConflictException.
        public let expectedVersion: Int64?
        /// Remove a thing type association. If true, the association is removed.
        public let removeThingType: Bool?
        /// The name of the thing to update. You can't change a thing's name. To change a thing's name, you must create a new thing, give it the new name, and then delete the old thing.
        public let thingName: String
        /// The name of the thing type.
        public let thingTypeName: String?

        public init(attributePayload: AttributePayload? = nil, expectedVersion: Int64? = nil, removeThingType: Bool? = nil, thingName: String, thingTypeName: String? = nil) {
            self.attributePayload = attributePayload
            self.expectedVersion = expectedVersion
            self.removeThingType = removeThingType
            self.thingName = thingName
            self.thingTypeName = thingTypeName
        }

        public func validate(name: String) throws {
            try self.attributePayload?.validate(name: "\(name).attributePayload")
            try self.validate(self.thingName, name: "thingName", parent: name, max: 128)
            try self.validate(self.thingName, name: "thingName", parent: name, min: 1)
            try self.validate(self.thingName, name: "thingName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, max: 128)
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, min: 1)
            try self.validate(self.thingTypeName, name: "thingTypeName", parent: name, pattern: "[a-zA-Z0-9:_-]+")
        }

        private enum CodingKeys: String, CodingKey {
            case attributePayload
            case expectedVersion
            case removeThingType
            case thingTypeName
        }
    }

    public struct UpdateThingResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateTopicRuleDestinationRequest: AWSEncodableShape {
        /// The ARN of the topic rule destination.
        public let arn: String
        /// The status of the topic rule destination. Valid values are:  IN_PROGRESS  A topic rule destination was created but has not been confirmed. You can set status to IN_PROGRESS by calling UpdateTopicRuleDestination. Calling UpdateTopicRuleDestination causes a new confirmation challenge to be sent to your confirmation endpoint.  ENABLED  Confirmation was completed, and traffic to this destination is allowed. You can set status to DISABLED by calling UpdateTopicRuleDestination.  DISABLED  Confirmation was completed, and traffic to this destination is not allowed. You can set status to ENABLED by calling UpdateTopicRuleDestination.  ERROR  Confirmation could not be completed, for example if the confirmation timed out. You can call GetTopicRuleDestination for details about the error. You can set status to IN_PROGRESS by calling UpdateTopicRuleDestination. Calling UpdateTopicRuleDestination causes a new confirmation challenge to be sent to your confirmation endpoint.
        public let status: TopicRuleDestinationStatus

        public init(arn: String, status: TopicRuleDestinationStatus) {
            self.arn = arn
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case arn
            case status
        }
    }

    public struct UpdateTopicRuleDestinationResponse: AWSDecodableShape {
        public init() {}
    }

    public struct ValidateSecurityProfileBehaviorsRequest: AWSEncodableShape {
        /// Specifies the behaviors that, when violated by a device (thing), cause an alert.
        public let behaviors: [Behavior]

        public init(behaviors: [Behavior]) {
            self.behaviors = behaviors
        }

        public func validate(name: String) throws {
            try self.behaviors.forEach {
                try $0.validate(name: "\(name).behaviors[]")
            }
            try self.validate(self.behaviors, name: "behaviors", parent: name, max: 100)
        }

        private enum CodingKeys: String, CodingKey {
            case behaviors
        }
    }

    public struct ValidateSecurityProfileBehaviorsResponse: AWSDecodableShape {
        /// True if the behaviors were valid.
        public let valid: Bool?
        /// The list of any errors found in the behaviors.
        public let validationErrors: [ValidationError]?

        public init(valid: Bool? = nil, validationErrors: [ValidationError]? = nil) {
            self.valid = valid
            self.validationErrors = validationErrors
        }

        private enum CodingKeys: String, CodingKey {
            case valid
            case validationErrors
        }
    }

    public struct ValidationError: AWSDecodableShape {
        /// The description of an error found in the behaviors.
        public let errorMessage: String?

        public init(errorMessage: String? = nil) {
            self.errorMessage = errorMessage
        }

        private enum CodingKeys: String, CodingKey {
            case errorMessage
        }
    }

    public struct ViolationEvent: AWSDecodableShape {
        /// The behavior that was violated.
        public let behavior: Behavior?
        /// The value of the metric (the measurement).
        public let metricValue: MetricValue?
        /// The name of the security profile whose behavior was violated.
        public let securityProfileName: String?
        /// The name of the thing responsible for the violation event.
        public let thingName: String?
        ///  The details of a violation event.
        public let violationEventAdditionalInfo: ViolationEventAdditionalInfo?
        /// The time the violation event occurred.
        public let violationEventTime: Date?
        /// The type of violation event.
        public let violationEventType: ViolationEventType?
        /// The ID of the violation event.
        public let violationId: String?

        public init(behavior: Behavior? = nil, metricValue: MetricValue? = nil, securityProfileName: String? = nil, thingName: String? = nil, violationEventAdditionalInfo: ViolationEventAdditionalInfo? = nil, violationEventTime: Date? = nil, violationEventType: ViolationEventType? = nil, violationId: String? = nil) {
            self.behavior = behavior
            self.metricValue = metricValue
            self.securityProfileName = securityProfileName
            self.thingName = thingName
            self.violationEventAdditionalInfo = violationEventAdditionalInfo
            self.violationEventTime = violationEventTime
            self.violationEventType = violationEventType
            self.violationId = violationId
        }

        private enum CodingKeys: String, CodingKey {
            case behavior
            case metricValue
            case securityProfileName
            case thingName
            case violationEventAdditionalInfo
            case violationEventTime
            case violationEventType
            case violationId
        }
    }

    public struct ViolationEventAdditionalInfo: AWSDecodableShape {
        ///  The sensitivity of anomalous behavior evaluation. Can be Low, Medium, or High.
        public let confidenceLevel: ConfidenceLevel?

        public init(confidenceLevel: ConfidenceLevel? = nil) {
            self.confidenceLevel = confidenceLevel
        }

        private enum CodingKeys: String, CodingKey {
            case confidenceLevel
        }
    }

    public struct ViolationEventOccurrenceRange: AWSEncodableShape & AWSDecodableShape {
        ///  The end date and time of a time period in which violation events occurred.
        public let endTime: Date
        ///  The start date and time of a time period in which violation events occurred.
        public let startTime: Date

        public init(endTime: Date, startTime: Date) {
            self.endTime = endTime
            self.startTime = startTime
        }

        private enum CodingKeys: String, CodingKey {
            case endTime
            case startTime
        }
    }

    public struct VpcDestinationConfiguration: AWSEncodableShape {
        /// The ARN of a role that has permission to create and attach to elastic network interfaces (ENIs).
        public let roleArn: String
        /// The security groups of the VPC destination.
        public let securityGroups: [String]?
        /// The subnet IDs of the VPC destination.
        public let subnetIds: [String]
        /// The ID of the VPC.
        public let vpcId: String

        public init(roleArn: String, securityGroups: [String]? = nil, subnetIds: [String], vpcId: String) {
            self.roleArn = roleArn
            self.securityGroups = securityGroups
            self.subnetIds = subnetIds
            self.vpcId = vpcId
        }

        private enum CodingKeys: String, CodingKey {
            case roleArn
            case securityGroups
            case subnetIds
            case vpcId
        }
    }

    public struct VpcDestinationProperties: AWSDecodableShape {
        /// The ARN of a role that has permission to create and attach to elastic network interfaces (ENIs).
        public let roleArn: String?
        /// The security groups of the VPC destination.
        public let securityGroups: [String]?
        /// The subnet IDs of the VPC destination.
        public let subnetIds: [String]?
        /// The ID of the VPC.
        public let vpcId: String?

        public init(roleArn: String? = nil, securityGroups: [String]? = nil, subnetIds: [String]? = nil, vpcId: String? = nil) {
            self.roleArn = roleArn
            self.securityGroups = securityGroups
            self.subnetIds = subnetIds
            self.vpcId = vpcId
        }

        private enum CodingKeys: String, CodingKey {
            case roleArn
            case securityGroups
            case subnetIds
            case vpcId
        }
    }

    public struct VpcDestinationSummary: AWSDecodableShape {
        /// The ARN of a role that has permission to create and attach to elastic network interfaces (ENIs).
        public let roleArn: String?
        /// The security groups of the VPC destination.
        public let securityGroups: [String]?
        /// The subnet IDs of the VPC destination.
        public let subnetIds: [String]?
        /// The ID of the VPC.
        public let vpcId: String?

        public init(roleArn: String? = nil, securityGroups: [String]? = nil, subnetIds: [String]? = nil, vpcId: String? = nil) {
            self.roleArn = roleArn
            self.securityGroups = securityGroups
            self.subnetIds = subnetIds
            self.vpcId = vpcId
        }

        private enum CodingKeys: String, CodingKey {
            case roleArn
            case securityGroups
            case subnetIds
            case vpcId
        }
    }
}
